如何在自定义时间触发 Flink 检查点?

huangapple go评论140阅读模式
英文:

How to trigger flink checkpoint on custom time?

问题

我需要每隔5分钟触发一次Flink的检查点,可以通过以下方式完成:

env.enableCheckpointing(5 * 60 * 1000);

此外,我希望检查点固定在x:00、x:05、x:10等时间点,有什么办法可以实现这个需求?

英文:

My case is pretty simple, I need to trigger flink checkpoint every 5 minutes, this can be done by:

env.enableCheckpointing(5m)

Moreover, I want the checkpoint to stick to x:00, x:05, x:10, ..., any idea how to accomplish this?

答案1

得分: 1

没有办法保证在特定时间点进行检查点。

您可以作为替代使用定时任务(cron job)在特定时间启动保存点,但检查点和保存点之间存在一些重要的差异,这可能会使这种解决方法不理想。

英文:

There's no way to guarantee that checkpoints will be taken at specific times.

You could, as an alternative, use a cron job to initiate savepoints at specific times, but there are some important differences between checkpoints and savepoints which might render this workaround undesirable.

huangapple
  • 本文由 发表于 2023年3月7日 18:03:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/75660500.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定