flink 关闭checkpoint
Flink 中关闭 checkpoint 可以通过以下两种方式来实现:
- 在代码中设置关闭 checkpoint
可以通过在代码中设置以下参数来关闭 checkpoint:
env.getCheckpointConfig().setCheckpointingMode(CheckpointingMode.EXACTLY_ONCE);
env.getCheckpointConfig().setCheckpointInterval(0);
其中,CheckpointingMode.EXACTLY_ONCE 表示精确一次的 checkpoint 模式,0 表示关闭 checkpoint,即不进行 checkpoint。
- 在 flink-conf.yaml 中设置关闭 checkpoint
可以在 flink-conf.yaml 中设置以下参数来关闭 checkpoint:
# 关闭 checkpoint
flink.checkpointing.interval: 0
其中,flink.checkpointing.interval 表示 checkpoint 间隔时间,设置为 0 表示关闭 checkpoint
原文地址: http://www.cveoy.top/t/topic/fnZ0 著作权归作者所有。请勿转载和采集!