Apache Flink:“由于接收到 checkpoints屏障而触发 checkpoints时出错”


0

偶尔会出现以下异常情况。

java.lang.RuntimeException: Error triggering a checkpoint as the result of receiving checkpoint barrier
    at org.apache.flink.streaming.runtime.tasks.StreamTask$2.onEvent(StreamTask.java:701)
    at org.apache.flink.streaming.runtime.tasks.StreamTask$2.onEvent(StreamTask.java:691)
    at org.apache.flink.streaming.runtime.io.BarrierBuffer.processBarrier(BarrierBuffer.java:203)
    at org.apache.flink.streaming.runtime.io.BarrierBuffer.getNextNonBlocked(BarrierBuffer.java:129)
    at org.apache.flink.streaming.runtime.io.StreamInputProcessor.processInput(StreamInputProcessor.java:175)
    at org.apache.flink.streaming.runtime.tasks.OneInputStreamTask.run(OneInputStreamTask.java:65)
    at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:225)
    at org.apache.flink.runtime.taskmanager.Task.run(Task.java:559)
    at java.lang.Thread.run(Thread.java:745) 
Caused by: java.lang.RuntimeException: Failed to fetch state handle size
    at org.apache.flink.runtime.taskmanager.RuntimeEnvironment.acknowledgeCheckpoint(RuntimeEnvironment.java:234)
    at org.apache.flink.streaming.runtime.tasks.StreamTask.performCheckpoint(StreamTask.java:528)
    at org.apache.flink.streaming.runtime.tasks.StreamTask$2.onEvent(StreamTask.java:695)
    ... 8 more
Caused by: java.io.FileNotFoundException: No such file or directory 's3n://xxxx/flink/datum/checkpoints/5bdceb1b79bd568de16fe82b01887b96/chk-14046/ee6d12f7-9b96-4f86-b66a-00ccdd23a8cc'
    at org.apache.hadoop.fs.s3native.NativeS3FileSystem.getFileStatus(NativeS3FileSystem.java:507)
    at org.apache.flink.runtime.fs.hdfs.HadoopFileSystem.getFileStatus(HadoopFileSystem.java:351)
    at org.apache.flink.runtime.state.filesystem.AbstractFileStateHandle.getFileSize(AbstractFileStateHandle.java:93)
    at org.apache.flink.runtime.state.filesystem.AbstractFsStateSnapshot.getStateSize(AbstractFsStateSnapshot.java:134)
    at org.apache.flink.streaming.runtime.tasks.StreamTaskStateList.getStateSize(StreamTaskStateList.java:87)
    at org.apache.flink.runtime.taskmanager.RuntimeEnvironment.acknowledgeCheckpoint(RuntimeEnvironment.java:231)
    ... 10 more

但这是档案。我该怎么做才能解决这个问题?

1 答案


0

看来你的问题是这个Flink JIRA问题描述的https://issues.apache.org/jira/browse/FLINK-4218它将其描述为执行基于目录的操作时的S3不一致问题。 root据JIRA问题,它在Flink 1.2和1.1.4中得到了解决(目前都没有发布)。


我来回答

写文章

提问题

面试题