命令行提交flink作业到 flink的 yarn的会话运行模式
·
1.命令行提交flink作业到 flink的 yarn的会话运行模式
#这里自动找yarn模式的IP和端口,我们不用写 -m参数。
[flink@hadoop001 flink-1.17.0]$ bin/flink run -c com.ycl.WordCountStreamUnboundedDemo lib/FlinkTuTorial-1.17-1.0-SNAPSHOT.jar
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/module/flink-1.17.0/lib/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/module/hadoop-3.3.6/share/hadoop/common/lib/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
2026-06-29 22:23:24,931 INFO org.apache.flink.yarn.cli.FlinkYarnSessionCli [] - Found Yarn properties file under /tmp/.yarn-properties-flink.
2026-06-29 22:23:24,931 INFO org.apache.flink.yarn.cli.FlinkYarnSessionCli [] - Found Yarn properties file under /tmp/.yarn-properties-flink.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.flink.api.java.ClosureCleaner (file:/opt/module/flink-1.17.0/lib/flink-dist-1.17.0.jar) to field java.lang.String.value
WARNING: Please consider reporting this to the maintainers of org.apache.flink.api.java.ClosureCleaner
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2026-06-29 22:23:25,340 WARN org.apache.flink.yarn.configuration.YarnLogConfigUtil [] - The configuration directory ('/opt/module/flink-1.17.0/conf')already contains a LOG4J config file.If you want to use logback, then please delete or rename the log configuration file.
2026-06-29 22:23:25,542 INFO org.apache.flink.yarn.YarnClusterDescriptor [] - No path for the flink jar passed. Using the location of classorg.apache.flink.yarn.YarnClusterDescriptor to locate the jar
2026-06-29 22:23:25,599 INFO org.apache.hadoop.yarn.client.ConfiguredRMFailoverProxyProvider [] - Failing over to yarnrm2
2026-06-29 22:23:25,648 INFO org.apache.flink.yarn.YarnClusterDescriptor [] - Found Web Interface hadoop003:22687 of application 'application_1782739955886_0004'.
Job has been submitted with JobID cfd4f49e77bc063e594b0ebb58ec536f
不指定-m时优先找这个问题;然后到yarn上去提交。
如果还是要往 standalone-job模式去提交,需要 -m 8081等。
[flink@hadoop001 flink-1.17.0]$ cat /tmp/.yarn-properties-flink
#Generated YARN properties file
#Mon Jun 29 21:56:12 CST 2026
applicationID=application_1782739955886_0004
dynamicPropertiesString=
每个flink 集群,只是yarn的一个应用而已。
更多推荐
所有评论(0)