gpt4 book ai didi

apache-flink - 失败消息 : Checkpoint expired before completing when using apache flink 1. 11

转载 作者:行者123 更新时间:2023-12-04 16:39:39 37 4
gpt4 key购买 nike

我最近在 kubernetes 集群中将我的 Apache Flink 升级到 1.11 版本,但是今天我发现一个任务检查点总是失败。此任务从 RabbitMQ 读取数据并计算结果并调用 HTTP 请求将数据保存到 MySQL。这是任务管理器错误日志输出:

2020-08-21 15:53:28
org.apache.flink.util.FlinkRuntimeException: Exceeded checkpoint tolerable failure threshold.
at org.apache.flink.runtime.checkpoint.CheckpointFailureManager.handleJobLevelCheckpointException(CheckpointFailureManager.java:66)
at org.apache.flink.runtime.checkpoint.CheckpointCoordinator.abortPendingCheckpoint(CheckpointCoordinator.java:1626)
at org.apache.flink.runtime.checkpoint.CheckpointCoordinator.abortPendingCheckpoint(CheckpointCoordinator.java:1603)
at org.apache.flink.runtime.checkpoint.CheckpointCoordinator.access$600(CheckpointCoordinator.java:90)
at org.apache.flink.runtime.checkpoint.CheckpointCoordinator$CheckpointCanceller.run(CheckpointCoordinator.java:1736)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

这是 Apache Flink UI 错误消息:

Failure Message: Checkpoint expired before completing.

作业总是在一段时间后重新启动。我有 2 个任务和另一个任务检查点保持成功。那么问题出在哪里,我应该怎么做才能解决这个问题?

enter image description here

这是我的 flink 配置:

 public static void initEnv(StreamExecutionEnvironment env) {
env.setParallelism(1);
env.enableCheckpointing(10000);
env.getCheckpointConfig().setCheckpointingMode(CheckpointingMode.EXACTLY_ONCE);
env.getCheckpointConfig().setMinPauseBetweenCheckpoints(1000);
env.getCheckpointConfig().setCheckpointTimeout(10000);
env.getCheckpointConfig().setMaxConcurrentCheckpoints(1);
env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);
env.getCheckpointConfig().enableExternalizedCheckpoints(CheckpointConfig.ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION);
StateBackend stateBackend = new FsStateBackend("file:///opt/flink/data");
env.setStateBackend(stateBackend);
}

最佳答案

尝试增加检查点的超时时间:

public static void initEnv(StreamExecutionEnvironment env) {
env.setParallelism(1);
env.enableCheckpointing(120000);
env.getCheckpointConfig().setCheckpointingMode(CheckpointingMode.EXACTLY_ONCE);
env.getCheckpointConfig().setMinPauseBetweenCheckpoints(1000);
env.getCheckpointConfig().setCheckpointTimeout(120000);
env.getCheckpointConfig().setMaxConcurrentCheckpoints(1);
env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);
env.getCheckpointConfig().enableExternalizedCheckpoints(CheckpointConfig.ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION);
StateBackend stateBackend = new FsStateBackend("file:///opt/flink/data");
env.setStateBackend(stateBackend);
}

关于apache-flink - 失败消息 : Checkpoint expired before completing when using apache flink 1. 11,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63518864/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com