使用flink同步数据出现错误Checkpoint expired before completing.
11:32:34,455 WARN org.apache.flink.runtime.checkpoint.CheckpointFailureManager [Checkpoint Timer] - Failed to trigger or complete checkpoint 4 for job 1b1d41031ea45d15bdb3324004c2d749. (2 consecutive failed attempts so far)
org.apache.flink.runtime.checkpoint.CheckpointException: Checkpoint expired before completing.
at org.apache.flink.runtime.checkpoint.CheckpointCoordinator$CheckpointCanceller.run(CheckpointCoordinator.java:2143)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java)
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)
11:32:34,459 INFO org.jobslink.flink.sink.OperateMysqlDataSink [Source: CDC Sourceorg.jobslink.flink.TradeAndWorkTypeAndSkillsCDCJob -> (Filter -> Flat Map -> Filter -> (Sink: Print to Std. Out, Sink: sink jk_skills_base), Filter -> Flat Map -> Filter -> (Sink: Print to Std. Out, Sink: sink jk_trade_base), Filter -> Flat Map -> Filter -> (Sink: Print to Std. Out, Sink: sink jk_worktypes_base)) (1/1)#0] - READ isExitSql is : [ SELECT count(1) count from jobslink_data_platform.src_skills_base where id= 1325753409319084034 ]
11:32:34,468 INFO org.apache.flink.runtime.jobmaster.JobMaster [flink-akka.actor.default-dispatcher-9] - Trying to recover from a global failure.
org.apache.flink.util.FlinkRuntimeException: Exceeded checkpoint tolerable failure threshold.
at org.apache.flink.runtime.checkpoint.CheckpointFailureManager.checkFailureAgainstCounter(CheckpointFailureManager.java:206)
at org.apache.flink.runtime.checkpoint.CheckpointFailureManager.handleJobLevelCheckpointException(CheckpointFailureManager.java:169)
at org.apache.flink.runtime.checkpoint.CheckpointFailureManager.handleCheckpointException(CheckpointFailureManager.java:122)
at org.apache.flink.runtime.checkpoint.CheckpointCoordinator.abortPendingCheckpoint(CheckpointCoordinator.java:2082)
at org.apache.flink.runtime.checkpoint.CheckpointCoordinator.abortPendingCheckpoint(CheckpointCoordinator.java:2061)
at org.apache.flink.runtime.checkpoint.CheckpointCoordinator.access$600(CheckpointCoordinator.java:98)
at org.apache.flink.runtime.checkpoint.CheckpointCoordinator$CheckpointCanceller.run(CheckpointCoordinator.java:2143)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java)
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)
11:32:34,470 INFO org.apache.flink.runtime.executiongraph.ExecutionGraph [flink-akka.actor.default-dispatcher-9] - Job org.jobslink.flink.TradeAndWorkTypeAndSkillsCDCJob (1b1d41031ea45d15bdb3324004c2d749) switched from state RUNNING to RESTARTING.
11:32:34,471 INFO org.apache.flink.runtime.executiongraph.ExecutionGraph [flink-akka.actor.default-dispatcher-9] - Source: CDC Sourceorg.jobslink.flink.TradeAndWorkTypeAndSkillsCDCJob -> (Filter -> Flat Map -> Filter -> (Sink: Print to Std. Out, Sink: sink base), Filter -> Flat Map -> Filter -> (Sink: Print to Std. Out, Sink: sink base), Filter -> Flat Map -> Filter -> (Sink: Print to Std. Out, Sink: sink base)) (1/1) (3525ceb58f2dc3264812966ec8600a19) switched from RUNNING to CANCELING.
任务超时了:
重新把任务配置参数,配置如下:
//开启CK
env.getCheckpointConfig().setCheckpointTimeout(60000);
//设置定期安排检查点的时间间隔。
env.getCheckpointConfig().setCheckpointInterval(60000);
//设置可能同时进行的检查点尝试的最大次数
env.getCheckpointConfig().setMaxConcurrentCheckpoints(500);
//设置检查点尝试之间的最小暂停时间。
env.getCheckpointConfig().setMinPauseBetweenCheckpoints(500);
或者修改
flink的 配置文件flink-conf.yaml 文章来源:https://www.toymoban.com/news/detail-720883.html
文章来源地址https://www.toymoban.com/news/detail-720883.html
到了这里,关于【flink】Checkpoint expired before completing.的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!