Flink streamingjava.lang.Exception异常:无法加载任务的可调用类


0

我试图在 local运行一个基本的Flink streaming job(在java中)。当我使用eclipse运行我的应用程序时,它就像一个魔咒。但是当我使用Flink命令行界面运行时,我得到以下异常

10/29/2015 11:15:54 Grouped Aggregation -> (Map -> Stream Sink,Stream Sink)(7/8) switched to SCHEDULED
10/29/2015 11:15:54 Grouped Aggregation -> (Map -> Stream Sink, Stream Sink)(7/8) switched to DEPLOYING
10/29/2015 11:15:54 Grouped Aggregation -> (Map -> Stream Sink, Stream Sink)(8/8) switched to SCHEDULED
10/29/2015 11:15:54 Grouped Aggregation -> (Map -> Stream Sink, Stream Sink)(8/8) switched to DEPLOYING
10/29/2015 11:15:54 Custom Source -> Flat Map -> Map(5/8) switched to    FAILED
java.lang.Exception: Could not load the task's invokable class.
at    org.apache.flink.runtime.taskmanager.Task.loadAndInstantiateInvokable(Tas k.java:696)
at org.apache.flink.runtime.taskmanager.Task.run(Task.java:450)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException: class   org.apache.flink.streaming.runtime.tasks.SourceStreamTask
at java.lang.Class.asSubclass(Class.java:3404)
at   org.apache.flink.runtime.taskmanager.Task.loadAndInstantiateInvokable(Tas    k.java:693)
... 2 more

10/29/2015 11:15:54 Custom Source -> Flat Map -> Map(2/8) switched to FAILED
java.lang.Exception: Could not load the task's invokable class.
at org.apache.flink.runtime.taskmanager.Task.loadAndInstantiateInvokable(Tas k.java:696)
at org.apache.flink.runtime.taskmanager.Task.run(Task.java:450)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException: class org.apache.flink.streaming.runtime.tasks.SourceStreamTask
at java.lang.Class.asSubclass(Class.java:3404)
at org.apache.flink.runtime.taskmanager.Task.loadAndInstantiateInvokable(Tas k.java:693)
... 2 more

我正在运行Flink-Kafka集成示例:

1 答案


0

问题已在Flink邮件列表中得到回答:http://apache-flink-user-mail-list-archive.2336050.n4.nabble.com/can-not-load-the-task-s-invokable-class-td3336.html

问题是Flink程序的jar是使用Eclipse构建的。用户可以使用Maven构建一个 job jar。


我来回答

写文章

提问题

面试题