问题:
org.apache.flink.yarn.AbstractYarnClusterDescriptor$YarnDeploymentException: The YARN application unexpectedly switched to state FAILED during deployment.
Diagnostics from YARN: Application application_1582728153073_0001 failed 2 times due to AM Container for appattempt_1582728153073_0001_000003 exited with exitCode: 1
For more detailed output, check application tracking page:http://hadoop01:8088/cluster/app/application_1582728153073_0001Then, click on links to logs of each attempt.
Diagnostics: Exception from container-launch.
Container id: container_1582728153073_0001_03_000001
Exit code: 1
Stack trace: ExitCodeException exitCode=1
......
解决:
在每个hadoop节点上的yarn-site.xml文件里添加下面的配置
实际业务中,集群上的内存分配是提前做好预估的,在业务处理的过程中需要根据业务的实际需要做出相应的调整,这实际上是技术问题,需要开发人员有一定的经验。