flink代码出现no instance(s) of type variable(s) T0, T1, T2 exist
生活随笔
收集整理的這篇文章主要介紹了
flink代码出现no instance(s) of type variable(s) T0, T1, T2 exist
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
肇事代碼是:
DataSet<Tuple3<Integer,Double,String>> in = env.readCsvFile("file://"+rootPath+"/"+"projection.csv").types(Integer.class, Double.class, String.class);intellij提示如下:
Incompatible types. Required DataSet<Tuple3<Integer, Double, String>>
but 'types' was inferred to DataSource<Tuple3<T0, T1, T2>>:
no instance(s) of type variable(s) T0, T1, T2 exist
so that Tuple3<T0, T1, T2> conforms to Tuple3<Integer, Double, String>
?
解決方案:
import scala.Tuple2; import scala.Tuple3; 改成 import org.apache.flink.api.java.tuple.Tuple3; import org.apache.flink.api.java.tuple.Tuple2;?
總結(jié)
以上是生活随笔為你收集整理的flink代码出现no instance(s) of type variable(s) T0, T1, T2 exist的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 我想看宝宝巴士世界(我的世界Minecr
- 下一篇: 芯片的反向流程是怎么样的?