【问题标题】:Retain Flink Checkpoint on cancellation取消时保留 Flink Checkpoint
【发布时间】:2022-10-24 10:46:21
【问题描述】:

我正在使用 Flink 1.15.0,我想在取消作业时保留触发的检查点。

Flink 表示这样设置 ExternalizeCheckpointCleanup 模式

env.getCheckpointConfig().setExternalizedCheckpointCleanup(
    CheckpointConfig.ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION);

从 Javadoc 他们说:

The target directory for externalized checkpoints is configured via CheckpointingOptions.CHECKPOINTS_DIRECTORY.

所以我写了这一行:

config.set(CheckpointingOptions.CHECKPOINTS_DIRECTORY, "hdfs:///checkpoints-data");

但是在他们的文档中,他们显示了这个 sn-p:

env.getCheckpointConfig().setCheckpointStorage("hdfs:///checkpoints-data/");

检查点目录和检查点存储有什么区别?

【问题讨论】:

  • 我不相信有任何区别。 (但我认为你需要三个斜杠,如“hdfs:///checkpoints-data/”)。
  • 谢谢@大卫安德森。我修好了,是错别字

标签: apache-flink flink-streaming flink-checkpoint


【解决方案1】:

相同。你可以直接在你的应用程序中setCheckpointStorage(),或者 Flink 将使用CheckpointingOptions.CHECKPOINTS_DIRECTORY 创建一个检查点存储。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-28
    相关资源
    最近更新 更多