|
flink 1.11+ 支持yarn application模式提交任务,我试着用这个模式提交examples下的TopSpeedWindowing任务,我将$FLINK_HOME/lib目录下的文件和要运行任务的jar文件都上传到了hdfs,运行如下命令:
./bin/flink run-application -p 1 -t yarn-application \
-yD yarn.provided.lib.dirs="hdfs://localhost:9000/flink/libs" \
hdfs://localhost:9000/user-jars/TopSpeedWindowing.jar
结果提交任务失败了,查看了日志报如下错误,请问是哪里出了问题?应该如何正确提交yarn application模式的任务?
xception in thread "main" java.lang.NoClassDefFoundError: scala/Option
at org.apache.flink.yarn.entrypoint.YarnEntrypointUtils.loadConfiguration(YarnEntrypointUtils.java:90)
at org.apache.flink.yarn.entrypoint.YarnApplicationClusterEntryPoint.main(YarnApplicationClusterEntryPoint.java:91)
Caused by: java.lang.ClassNotFoundException: scala.Option
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 2 more
|