这里虚拟机模拟三台机器,分别为node01,node02,node03
搭建计划 Flink Yarn HA模式
node01: JM+TM
node02:JM+TM --备用节点
node03:TM
1.上传解压
2.flink下创建目录tem
3.修改配置文件
3.1conf/flink-conf.yaml
1 jobmanager.rpc.address: node01 2 jobmanager.rpc.port: 6123 3 jobmanager.heap.mb: 1024 4 taskmanager.heap.mb: 1024 5 taskmanager.numberOfTaskSlots: 2 6 taskmanager.memory.preallocate: false 7 parallelism.default: 1 8 jobmanager.web.port: 8081 9 taskmanager.tmp.dirs: /export/servers/flink-1.7.2/tmp 10 #开启HA 11 state.backend: filesystem 12 state.backend.fs.checkpointdir: hdfs://node01:8020/flink-checkpoints 13 high-availability: zookeeper 14 high-availability.storageDir: hdfs://node01:8020/flink/ha/ 15 high-availability.zookeeper.quorum: node01:2181,node02:2181,node03:2181
3.2修改conf/masters
node01:8081 node02:8081
3.3修改conf/slaves
node01 node02 node03
4.分发
scp -r flink-1.7.2/ node02:$PWD scp -r flink-1.7.2/ node03:$PWD
OK,经测试可以使用
原文:https://www.cnblogs.com/note-djl/p/11801802.html