Apache Flink:"由于接收检查点障碍而导致检查点触发错误"

时间:2016-06-27 11:14:25

标签: apache-flink flink-streaming

零星的例外情况如下所示。

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 :(得分:0)

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