开发者社区> 问答> 正文

flink源码编译可以不编译scala代码吗

Hi,All: 我再尝试编译flink 1.7的源码时,遇到如下错误,本人对scala不是很了解,不知道是不是版本问题引起,另外可以去掉sacla模块编译吗: 本机scala版本:2.13.0 JDK 版本: 1.8.0_91 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project flink-scala_2.11: Compilation failure: Compilation failure: [ERROR] /Users/gang.gou/work/git/github/flink/flink-scala/src/main/java/org/apache/flink/api/scala/typeutils/ScalaEitherSerializerSnapshot.java:[67,44] 不兼容的类型: 无法推断org.apache.flink.api.java.typeutils.runtime.EitherSerializer<>的类型参数 [ERROR] 原因: 不存在类型变量L,R,T,T的实例, 以使org.apache.flink.api.java.typeutils.runtime.EitherSerializer<L,R>与org.apache.flink.api.common.typeutils.TypeSerializer<scala.util.Either<L,R>>一致 [ERROR] /Users/gang.gou/work/git/github/flink/flink-scala/src/main/java/org/apache/flink/api/scala/typeutils/ScalaEitherSerializerSnapshot.java:[78,86] 不兼容的类型: org.apache.flink.api.common.typeutils.TypeSerializer<scala.util.Either<L,R>>无法转换为org.apache.flink.api.java.typeutils.runtime.EitherSerializer<L,R> [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :flink-scala_2.11

Process finished with exit code 1*来自志愿者整理的flink邮件归档

展开
收起
小阿怪 2021-12-07 22:17:53 810 0
1 条回答
写回答
取消 提交回答
  • Flink 编译的默认 Scala 版本是 2.11.x,你可以试着把 Scala 版本切换成 2.11.x 再编译一下。

    *来自志愿者整理的flink邮件归档

    2021-12-08 10:36:31
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Flink峰会 - 徐榜江 立即下载
Just Enough Scala for Spark 立即下载
JDK8新特性与生产-for“华东地区scala爱好者聚会” 立即下载