flink-1.7.2-bin-hadoop27-scala_2.11.tgz
进入文件目录
tar -zxvf flink-1.7.2-bin-hadoop27-scala_2.11.tgz -C /usr.local/hdfs/
cd $FLINK_HOME/conf
将默认的localhost改为自己实际的IP地址
33 jobmanager.rpc.address: host # 冒号后面有个空格
Mster slave1 slave2 ...
scp -r flink-1.7.2/ root@slave1:/root/training scp -r flink-1.7.2/ root@slave1:/root/training
start-cluster.sh ($FLINK_HOME/bin/start-cluster.sh)
$FLINK_HOME/bin/yarn-session.sh -n 2 -jm 1024 -tm 1024 -d
$FLINK_HOME/bin/flink run -m yarn-cluster -yn 1 -yjm 1024 -ytm 1024 <job>
常用参数:
-m:运行在yarn上 -yn:分配一个NodeManager -yjm: JobManager的内存 -ytm:TaskManager内存
Flink默认的端口为:host:8081