could not find implicit value for evidence parameter of type org.apache.flink.api.common.typeinfo

錯誤

Information:2020/1/29 13:34 - Compilation completed with 2 errors and 0 warnings in 1 s 440 ms
D:\new\flink-scala\src\main\scala\com\it\flink\wordcount\BstchWordCountOnScala.scala
Error:(17, 47) could not find implicit value for evidence parameter of type org.apache.flink.api.common.typeinfo.TypeInformation[String]
val line: DataSet[String] = source.flatMap(.split("\t"))
Error:(17, 47) 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.
val line: DataSet[String] = source.flatMap(
.split("\t"))

原因沒有找到隱式轉換

解決方案導包

import org.apache.flink.api.scala._
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章