状态恢复和重启策略
手动重启并恢复
1.把程序打包
2.启动Flink集群(本地单机版,集群版都可以)
/export/server/flink/bin/start-cluster.sh
3.访问webUI
http://node1.itcast.cn:8081/#/overview
4.使用FlinkWebUI提交
cn.itcast.flink.checkpoint.StreamCheckpointDemo
hdfs://node1.itcast.cn:8020/flink-checkpoint/checkpoint
5.取消任务
6.重新启动任务并指定从哪恢复
cn.itcast.flink.checkpoint.StreamCheckpointDemo
hdfs://node1.itcast.cn:8020/flink-checkpoint/checkpoint
hdfs://node1.itcast.cn:8020/flink-checkpoint/checkpoint/aedbaa962fc720954651d27d95fcb53f/chk-106
7.最后关闭/取消任务