一、环境准备:
1.1 jdk1.8、yarn集群环境
1.2 下载Flink1.15.2
1.3 解压到 /opt/soft/
1.4 下载 flink-shaded-hadoop-2-uber-2.8.3-10.0.jar 并放在/opt/soft/flink1.15.2/lib 下
二、Flink Yarn Session模式启动:
2.1 启动 Yarn Session模式
$ ./flink1.15.2/bin/yarn-session.sh -n 2 -tm 800 -s 1 -d
2.2 启动 一个Demo测试:
./flink run ../example/batch/WordCount.war
问题:
1、启动yarn session模式的时候,报错:Deployment took more than 60 seconds, Please check if the requested resources are available in the YARN cluster
解决: 在Hadood/et/hadoop目录下修改配置文件 yarn.site.xml,添加配置
<property> <name>yarn.scheduler.minimum-allocation-mb</name> <value>1024</value> </property> <property> <name>yarn.scheduler.maximum-allocation-mb</name> <value>102400</value> </property> <property> <name>yarn.nodemanager.resource.cpu-vcores</name> <value>32</value> </property> <property> <name>yarn.nodemanager.resource.memory-mb</name> <value>51200</value> </property>
参考:
https://segmentfault.com/a/1190000043033270
标签:mb,启动,Flink,yarn,集群,Yarn From: https://www.cnblogs.com/happyflyingpig/p/17124316.html