flink-conf.yaml配置文件:
jobmanager.rpc.address: hadoop1
jobmanager.rpc.port: 6123
jobmanager.heap.size: 512m
taskmanager.heap.size: 512m
taskmanager.numberOfTaskSlots: 4
parallelism.default: 2
yarn.application-attempts: 5
yarn.reallocate-failed: true
yarn.maximum-failed-containers: 5
high-availability.zookeeper.quorum: hadoop1:2181,hadoop2:2181,hadoop3:2181
high-availability.storageDir: hdfs:/hadoop1:8020//flink/recovery
high-availability.zookeeper.path.root: /flink
state.checkpoints.dir: hdfs://hadoop1:8020//flink/flink-checkpoints
state.backend.incremental: true
state.checkpoints.num-retained: 20
state.savepoints.dir: hdfs://hadoop1:8020//flink/flink-savepoints
rest.port: 8081
state.backend: filesystem
restart-strategy.fixed-delay.attempts: 5
restart-strategy.fixed-delay.delay: 10 s
yarn-cluster启动命令
./bin/flink run -m yarn-cluster -c -d com.zmm.mainClass --config /data/config/xxx.properties &>log/tt.log &
yarn取消命令:
./bin/flink cancel -s -m yarn-cluster -yid applicationId jobId