checkpoint不生效
flink版本 1.13 cdc 版本 2.02
配置文件 flink-conf.yaml 设置如下
state.backend: filesystem state.checkpoints.dir: file:///tmp/flink-checkpoints state.savepoints.dir: file:///tmp/flink-savepoints
CDC session中设置如下:
RESET execution.checkpointing.interval; RESET execution.checkpoints.path; SET 'execution.checkpointing.interval' = '3s'; SET 'execution.checkpoints.path' = 'file:///tmp/flink-checkpoints';
SELECT COUNT(OE.id) AS QTY ,SUM(OE.pay_amount) / 100 AS AMT FROM ODS_ORDER_INFO OE LEFT JOIN DIM_SHOP FOR SYSTEM_TIME AS OF OE.proc_time SH ON OE.shop_id = SH.shop_id WHERE SH.top_company_id = 1 AND OE.created_time >= '2021-11-01' ;
结果 : cancel掉任务 ,从新 计算 checkpoint不生效 设置的state.checkpoints.dir: file 目录下 有 checkpoint文件生成
其中表用的时候阿里的RDS库
重启时可能需要指定检查点位置
我使用的命令是: flink run -m yarn-cluster -ys * -yjm * -ytm * -p * -ynm * -s checkpoint文件位置 -c * jar *
希望对你有帮助
Flink supports to start the job with specified savepoint. In SQL Client, it’s allowed to use SET command to specify the path of the savepoint.
Flink SQL> SET execution.savepoint.path=/tmp/flink-savepoints/savepoint-cca7bc-bb1e257f0dab;
ref: https://nightlies.apache.org/flink/flink-docs-release-1.13/zh/docs/dev/table/sqlclient/#start-a-sql-job-from-a-savepoint
I met the question too. My checkpoint settings are as follows:
configuration.setString("execution.checkpointing.interval", "10 s"); configuration.setString("execution.checkpointing.externalized-checkpoint-retention","RETAIN_ON_CANCELLATION"); configuration.setString("execution.checkpointing.mode","EXACTLY_ONCE"); configuration.setString("execution.savepoint.path", “hdfs://HermesServices/flink-checkpoints/f9bf57fe21994d663851d3b07cf4dd34/chk-20");
when I canceled my job and restart it . It cant restore from the specified checkpoint
Closing this issue because it was created before version 2.3.0 (2022-11-10). Please try the latest version of Flink CDC to see if the issue has been resolved. If the issue is still valid, kindly report it on Apache Jira under project Flink with component tag Flink CDC. Thank you!