当前位置:   article > 正文

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

could not find implicit value for evidence parameter of type org.apache.flin

 scala helloword 报错:could not find implicit value for evidence parameter of type     org.apache.flink.api.common.typeinfo.TypeInformation[(String, Int)] 

  1. import org.apache.flink.api.scala.{DataSet, ExecutionEnvironment}
  2. import org.apache.flink.api.scala._
  3. object DataSetWcApp {
  4. def main(a: Array[String]): Unit = {
  5. val env: ExecutionEnvironment = ExecutionEnvironment.getExecutionEnvironment
  6. val textDataSet: DataSet[String] =
  7. env.readTextFile("C:\\Users\\gxk\\Desktop\\hello.txt")
  8. textDataSet.flatMap(_.split(" ")).map((_, 1)).groupBy(0).sum(1).print()
  9. }
  10. }

解决隐式转换的包导入了就是报错

苦苦思索中..... 灵机一动

原来是因为本地安装的scala和程序中导入的scala jar包版本不一致导致的 !真的棒槌!!!

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/木道寻08/article/detail/972455
推荐阅读
相关标签
  

闽ICP备14008679号