在本地使用flink 0.10.1时,由于以下错误,我无法连接到jobmanager:
Association with remote system [akka.tcp://flink@127.0.0.1:49789] has failed, address is now gated for [5000] ms. Reason is: [scala.Option; local class incompatible: stream classdesc serialVersionUID = -2062608324514658839, local class serialVersionUID = -114498752079829388].
还有我的pom.xml:
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>0.10.1</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-clients</artifactId>
<version>0.10.1</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-hadoop-compatibility</artifactId>
<version>0.10.1-hadoop1</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-jdbc</artifactId>
<version>0.10.1-hadoop1</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-ml</artifactId>
<version>0.10.1-hadoop1</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java</artifactId>
<version>0.10.1</version>
</dependency>
</dependencies>
使用flink 0.9.1效果良好。。。我缺少什么?非常感谢。
这听起来像是版本不匹配,即您的代码库中有旧的0.9.1二进制文件。。。尝试通过清理您的maven缓存
cd ~/.m2/repositories/org/apache/flink
rm -rf *
之后,重新构建您的项目:mvn -DskipTests clean package
好的,问题如下:在flink下载页面上有几个指向flink项目的链接(二进制文件和源代码)我下载了没有hadoop的普通版本,因为这是为了在本地进行测试,我不使用hadoop。但我现在不明白为什么它需要我下载的带有scala的hadoop:Hadoop 2.7.0与scala 2.10配合使用。