15、Flink实战:容错机制(五)checkpoints保存报错Couldnotflushandclosethefilesystemoutputstreamtohdfs

本文详细分析了Flink保存Checkpoint时遇到的“Could not flush and close the file system output stream”错误,特别是“could only be replicated to 0 nodes”的HDFS写入问题。根本原因是flink-conf.yaml配置文件在多节点集群中配置不一致,提供了具体的解决方案和配置修改步骤。

在保存checkpints的时候,可能会出现保存失败的情况。我遇到的报错如下:

Could not flush and close the file system output stream to hdfs:….

could only be replicated to 0 nodes instead of minReplication (=1). There are 2 datanode(s) running and no node(s) are excluded in this operation.

我的原因是flink-conf.yaml配置文件配置错误。

我只在一个节点上的flink-conf.yaml进行了如下配置,将所有节点上的配置文件都按如下修改,问题解决。

 

版权声明:本文不是「本站」原创文章,版权归原作者所有 | 原文地址: