【flink】Checkpoint expired before completing.

使用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.

任务超时了:

重新把任务配置参数,配置如下:

java 复制代码
//开启CK
env.getCheckpointConfig().setCheckpointTimeout(60000);
//设置定期安排检查点的时间间隔。
env.getCheckpointConfig().setCheckpointInterval(60000);
//设置可能同时进行的检查点尝试的最大次数
env.getCheckpointConfig().setMaxConcurrentCheckpoints(500);
//设置检查点尝试之间的最小暂停时间。
env.getCheckpointConfig().setMinPauseBetweenCheckpoints(500);

或者修改

flink的 配置文件flink-conf.yaml

相关推荐
小刘鸭!1 小时前
Flink中并行度和slot的关系——任务和任务槽
大数据·flink
LI JS@你猜啊2 小时前
Elasticsearch 集群
大数据·服务器·elasticsearch
筒栗子2 小时前
复习打卡大数据篇——Hadoop HDFS 03
大数据·hadoop·hdfs
SelectDB5 小时前
Apache Doris 创始人:何为“现代化”的数据仓库?
大数据·数据库·云原生
SelectDB5 小时前
飞轮科技荣获中国电信星海大数据最佳合作伙伴奖!
大数据·数据库·数据分析
core5126 小时前
flink cdc各种数据库 jar下载地址
mysql·oracle·flink·jar·oceanbase·cdc
小刘鸭!6 小时前
Hbase的特点、特性
大数据·数据库·hbase
Elastic 中国社区官方博客6 小时前
如何通过 Kafka 将数据导入 Elasticsearch
大数据·数据库·分布式·elasticsearch·搜索引擎·kafka·全文检索
nece0016 小时前
elasticsearch 杂记
大数据·elasticsearch·搜索引擎
开心最重要(*^▽^*)6 小时前
Es搭建——单节点——Linux
大数据·elasticsearch