yarn application模式提交任务失败

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

yarn application模式提交任务失败

casel.chen
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
Reply | Threaded
Open this post in threaded view
|

Re: yarn application模式提交任务失败

silence-2
应该是-D不是-yD



--
Sent from: http://apache-flink.147419.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: yarn application模式提交任务失败

Yang Wang
silence的回答是对的
如果用-t参数,搭配的都是-D来引导的,不需要prefix,文档里面也是[1]
这个和之前-m yarn-cluster是不一样的,以前的方式需要-yD来引导

[1].
https://ci.apache.org/projects/flink/flink-docs-master/deployment/resource-providers/yarn.html#application-mode

Best,
Yang

silence <[hidden email]> 于2020年12月21日周一 上午10:53写道:

> 应该是-D不是-yD
>
>
>
> --
> Sent from: http://apache-flink.147419.n8.nabble.com/
>
Reply | Threaded
Open this post in threaded view
|

Re: yarn application模式提交任务失败

datayangl
This post was updated on .
那如果是yarn-cluster模式该怎么使用这个参数呢 -yD?



--
Sent from: http://apache-flink.147419.n8.nabble.com/