Blog
flink-42 sql-client使用savepoint
提交insert作业可以给作业设置名称
SET pipeline.name=haha;
INSERT INTO sink SELECT * FROM source;
-- 后续不使用该名称
RESET pipeline.name;
查看job列表
show jobs;
停止作业,触发savepoint
SET state.checkpoints.dir='hdfs://hadoop001:8020/chk';
SET state.savepoints.dir='hdfs://hadoop001:8020/sp';
STOP JOB 'jobid' WITH SAVEPOINT;
从savepoint恢复
-- 设置从savepoint恢复的路径
SET state.savepoints.dir='hdfs://hadoop001:8020/sp/savepoint-jobid'
-- 之后提交sql就会从savepoint恢复
-- 允许跳过无法还原的保存点状态
set 'execution.savepoint.ignore-unclaimed-state' = 'true'
重置savepoint 防止后续sql都从改sp重启
RESET execution.savepoint.path;