英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论