flink 0.10.1出错

jc3wubiy  于 2021-06-24  发布在  Flink
关注(0)|答案(2)|浏览(365)

在本地使用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运行良好。。。我错过了什么?谢谢您!

jdg4fx2g

jdg4fx2g1#

好的,问题是:在flink下载页面上有几个到flink项目的链接(二进制文件和源代码),我下载了没有hadoop的普通项目,因为是为了在本地进行测试,我不使用hadoop。但我现在不知道为什么它需要我下载的带有scala的hadoop:hadoop2.7.0和scala2.10,它可以工作。

pxiryf3j

pxiryf3j2#

听起来像是版本不匹配,即,您的代码库中有旧的0.9.1二进制文件。。。尝试通过

cd ~/.m2/repositories/org/apache/flink
rm -rf *

之后,重建项目: mvn -DskipTests clean package

相关问题