Flink 上 Beam 管道 运行 期间与内存段相关的 EOFException
EOFException related to memory segments during run of Beam pipeline on Flink
我正在尝试 运行 我们测试集群上 Flink 上的 Apache Beam 管道。它在 org.apache.flink.runtime.io.disk.SimpleCollectingOutputView:79
during the encoding of an object through serialisation. I haven't been able to reproduce the error locally, yet. You can find the entire job log here 处出现 EOFException
失败。一些值已被假数据替换。
用于运行管道的命令:
bin/flink run \
-m yarn-cluster \
--yarncontainer 1 \
--yarnslots 4 \
--yarnjobManagerMemory 2000 \
--yarntaskManagerMemory 2000 \
--yarnname "EBI" \
pipeline.jar \
--runner=FlinkRunner \
--zookeeperQuorum=hdp-master-001.fake.org:2181
虽然我认为这不相关,但要序列化的对象是可序列化的,并且具有隐式和显式编码器,但这并不影响情况。
可能是什么原因导致了这种情况,我该如何解决?
目前,将管理器的堆内存增加到 4 到 8GiB 之间的某处似乎可以防止异常。仍然不确定这是否应该是正常的 Flink 行为(它不应该溢出到磁盘吗?)。看起来不像是可以扩展的解决方案。
抛出 EOFException
因为 Flink 运行 内存缓冲区不足。 Flink 期望 EOFException
作为开始将数据写入磁盘的通知。
这个问题是由于 Beam 的 SerializableCoder
将 EOFException
包裹在 CoderException
中引起的。因此,Flink 没有捕捉到预期的 EOFException
而失败。
这个问题可以通过使用不包装 EOFException
而是转发它的自定义编码器来解决。
我正在尝试 运行 我们测试集群上 Flink 上的 Apache Beam 管道。它在 org.apache.flink.runtime.io.disk.SimpleCollectingOutputView:79
during the encoding of an object through serialisation. I haven't been able to reproduce the error locally, yet. You can find the entire job log here 处出现 EOFException
失败。一些值已被假数据替换。
用于运行管道的命令:
bin/flink run \
-m yarn-cluster \
--yarncontainer 1 \
--yarnslots 4 \
--yarnjobManagerMemory 2000 \
--yarntaskManagerMemory 2000 \
--yarnname "EBI" \
pipeline.jar \
--runner=FlinkRunner \
--zookeeperQuorum=hdp-master-001.fake.org:2181
虽然我认为这不相关,但要序列化的对象是可序列化的,并且具有隐式和显式编码器,但这并不影响情况。
可能是什么原因导致了这种情况,我该如何解决?
目前,将管理器的堆内存增加到 4 到 8GiB 之间的某处似乎可以防止异常。仍然不确定这是否应该是正常的 Flink 行为(它不应该溢出到磁盘吗?)。看起来不像是可以扩展的解决方案。
抛出 EOFException
因为 Flink 运行 内存缓冲区不足。 Flink 期望 EOFException
作为开始将数据写入磁盘的通知。
这个问题是由于 Beam 的 SerializableCoder
将 EOFException
包裹在 CoderException
中引起的。因此,Flink 没有捕捉到预期的 EOFException
而失败。
这个问题可以通过使用不包装 EOFException
而是转发它的自定义编码器来解决。