运行flink命令如下:
./bin/flink run -t yarn-per-job --detached ./examples/batch/WordCount.jar
但是发现没有输出运行结果,日志如下
Executing WordCount example with default input data set. Use --input to specify file input. Printing result to stdout. Use --output to specify output path. 2021-05-08 21:53:46,561 WARN org.apache.flink.yarn.configuration.YarnLogConfigUtil [] - The configuration directory ('/mnt/flink-1.12.3/conf') already contains a LOG4J config file.If you want to use logback, then please delete or rename the log configuration file. 2021-05-08 21:53:46,611 INFO org.apache.hadoop.yarn.client.DefaultNoHARMFailoverProxyProvider [] - Connecting to ResourceManager at node01/172.19.0.132:8032 2021-05-08 21:53:46,925 INFO org.apache.flink.yarn.YarnClusterDescriptor [] - No path for the flink jar passed. Using the location of class org.apache.flink.yarn.YarnClusterDescriptor to locate the jar 2021-05-08 21:53:47,159 INFO org.apache.hadoop.conf.Configuration [] - resource-types.xml not found 2021-05-08 21:53:47,160 INFO org.apache.hadoop.yarn.util.resource.ResourceUtils [] - Unable to find 'resource-types.xml'. 2021-05-08 21:53:47,224 INFO org.apache.flink.yarn.YarnClusterDescriptor [] - The configured JobManager memory is 1600 MB. YARN will allocate 2048 MB to make up an integer multiple of its minimum allocation memory (1024 MB, configured via 'yarn.scheduler.minimum-allocation-mb'). The extra 448 MB may not be used by Flink. 2021-05-08 21:53:47,224 INFO org.apache.flink.yarn.YarnClusterDescriptor [] - The configured TaskManager memory is 1728 MB. YARN will allocate 2048 MB to make up an integer multiple of its minimum allocation memory (1024 MB, configured via 'yarn.scheduler.minimum-allocation-mb'). The extra 320 MB may not be used by Flink. 2021-05-08 21:53:47,225 INFO org.apache.flink.yarn.YarnClusterDescriptor [] - Cluster specification: ClusterSpecification{masterMemoryMB=1600, taskManagerMemoryMB=1728, slotsPerTaskManager=1} 2021-05-08 21:53:53,360 INFO org.apache.flink.yarn.YarnClusterDescriptor [] - Submitting application master application_1620481460888_0003 2021-05-08 21:53:53,425 INFO org.apache.hadoop.yarn.client.api.impl.YarnClientImpl [] - Submitted application application_1620481460888_0003 2021-05-08 21:53:53,425 INFO org.apache.flink.yarn.YarnClusterDescriptor [] - Waiting for the cluster to be allocated 2021-05-08 21:53:53,427 INFO org.apache.flink.yarn.YarnClusterDescriptor [] - Deploying cluster, current state ACCEPTED 2021-05-08 21:54:53,548 INFO org.apache.flink.yarn.YarnClusterDescriptor [] - Deployment took more than 60 seconds. Please check if the requested resources are available in the YARN cluster 2021-05-08 21:54:53,825 INFO org.apache.flink.yarn.YarnClusterDescriptor [] - Deployment took more than 60 seconds. Please check if the requested resources are available in the YARN cluster 2021-05-08 21:54:54,077 INFO org.apache.flink.yarn.YarnClusterDescriptor [] - Deployment took more than 60 seconds. Please check if the requested resources are available in the YARN cluster
代码里输出的内容正常打印,但是没有打印结果
flink版本 1.12.3 Hadoop版本3.3.0
期望得到您的回复*来自志愿者整理的flink邮件归档
Hi, 看日志application已经提交到yarn了,但是am没有调度起来,看一下Yarn界面application_1620481460888_0003 这个application的状态是什么?有没有报错*来自志愿者整理的FLINK邮件归档
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。