1.编写程序本地运行正常
2.程序正常打包
3.提交作业到FLINK集群
./bin/flink run -m hdf1:8081 -c com.org.cdc.FlinkCDCDataStreamTest ./FlinkCdc-test.jar
4.监控作业运行
作业正常运行,cud查看 taskmanager log,可以看到cud变更数据
5.给当前的Flink程序创建Savepoint
bin/flink savepoint 79440d0a1e3f8bf9fbbb0eb5fc04e8e0 hdfs://hdf1:8020/flinkCDC/save
在WebUI中cancelJob
在MySQL的表中添加、修改或者删除数据
从Savepoint重启程序
bin/flink run -s hdfs://hdf1:8020/flinkCDC/save/savepoint-5dadae-02c69ee54885 -c com.org.cdc.FlinkCDCDataStreamTest ./FlinkCdc-test.jar
观察TaskManager日志,会从检查点读取表数据
6.报错 No path for the flink jar passed. Using the location of class org.apache.flink.yarn.YarnClusterDescriptor to locate the jar
该错暂时搁置,无法手动创建保存点
flink savepoint 5e8c92c0cea783738c9b62abbe84c504 /tmp/flink/checkpoints/
标签:bin,datastream,hdf1,FLINKCDC3.0,程序运行,savepoint,flink,jar,org From: https://www.cnblogs.com/huft/p/18170176