错误描述:
could not find implicit value for evidence parameter of type org.apache.flink.api.common.typeinfo.TypeInformation[String]
Error:(17, 15) could not find implicit value for evidence parameter of type org.apache.flink.api.common.typeinfo.TypeInformation[String]
.flatMap(_.split(" "))
Error:(17, 15) not enough arguments for method flatMap: (implicit evidence$16: org.apache.flink.api.common.typeinfo.TypeInformation[String], implicit evidence$17: scala.reflect.ClassTag[String])org.apache.flink.api.scala.DataSet[String].
Unspecified value parameters evidence$16, evidence$17.
.flatMap(_.split(" "))
官网说明:
1:A frequent reason if that the code that generates the TypeInformation has not been imported. Make sure to import the entire flink.api.scala package.
2:Another common cause are generic methods, which can be fixed as described in the following section.
解决方法:
推荐的做法是在代码中引入以下包:
import org.apache.flink.streaming.api.scala._
如果数据是有限的(静态数据集),我们可以引入以下包:
import org.apache.flink.api.scala._
如果通过以上方式问题还是没有解决,则看下Scala版本问题。
?
|