flink 启动job命令
0. 启动flink-session
./bin/yarn-session.sh -n 4 -s 3 -jm 2048 -tm 6144
高版本
bin/yarn-session.sh -d -s 3 -jm 2048 -tm 6144 -qu root.sparkstreaming -nm hm2-helper-workflow
参数解读
1. checkpoint
# 开启checkpoint,默认为最近20个
# 从指定的checkpoint处启动,最近的一个/flink/checkpoints/workFlowCheckpoint/339439e2a3d89ead4d71ae3816615281/chk-1740584启动,通常需要先停掉当前运行的flink-session,然后通过命令启动
#!/bin/bash ../bin/flink run -p 10 -s /flink/checkpoints/workFlowCheckpoint/339439e2a3d89ead4d71ae3816615281/chk-1740584/_metadata -c com.code2144.helper_wink-1.0-SNAPSHOT.jar
启动后是CREATED状态
过一会恢复为RUNNING状态
2. savepoint
# 手动savepoint
/app/local/flink-1.6.2/bin/flink savepoint 0409251eaff826ef2dd775b6a2d5e219 [hdfs://bigdata/path]
# 手动取消任务
/app/local/flink-1.6.2/bin/flink cancel 0409251eaff826ef2dd775b6a2d5e219
# 从指定savepoint启动job
bin/flink run -p 8 -s hdfs:///flink/savepoints/savepoint-567452-9e3587e55980 -c com.code2144.helper_workflow.HelperWorkFlowStreaming jars/BSS-ONSS-Flink-1.0-SNAPSHOT.jar