【发布时间】:2016-06-15 19:48:01
【问题描述】:
我们有一个包含五个节点的 HDFS 集群。在将新文件写入文件系统时,我们经常收到“副本不足”错误或以下错误:
2016-05-29 13:30:03,972 [Thread-486536] INFO org.apache.hadoop.hdfs.DFSClient - Exception in createBlockOutputStream
java.io.IOException: Got error, status message , ack with firstBadLink as 10.100.1.22:50010
at org.apache.hadoop.hdfs.protocol.datatransfer.DataTransferProtoUtil.checkBlockOpStatus(DataTransferProtoUtil.java:142) ~[hadoop-hdfs-2.7.1.jar!/:na]
...
2016-05-29 13:30:03,972 [Thread-486536] INFO org.apache.hadoop.hdfs.DFSClient - Abandoning BP-1195099512-10.100.1.21-1454597789659:blk_1085523876_11792285
2016-05-29 13:30:03,977 [Thread-486536] INFO org.apache.hadoop.hdfs.DFSClient - Excluding datanode DatanodeInfoWithStorage[10.100.1.22:50010,DS-2f34af8d-234a-4036-a810-908c3b2bd9cf,DISK]
2016-05-29 13:30:04,003 [pool-1272-thread-3] WARN org.apache.hadoop.hdfs.DFSClient - Slow waitForAckedSeqno took 65098ms (threshold=30000ms)
我们也遇到过很多这样的情况,好像是在 big GC'ing 发生的时候。
[pool-9-thread-23] WARN org.apache.hadoop.hdfs.DFSClient - Slow waitForAckedSeqno took 34607ms (threshold=30000ms)
[pool-9-thread-30] WARN org.apache.hadoop.hdfs.DFSClient - Slow waitForAckedSeqno took 34339ms (threshold=30000ms)
[pool-9-thread-5] WARN org.apache.hadoop.hdfs.DFSClient - Slow waitForAckedSeqno took 34593ms (threshold=30000ms)
文件系统包含 650 万个小 (4-20 kB) 文件,当我们写入新文件时,节点会因 OOM 而关闭。新文件总是分批写入,一个批次可能有几十万个。
节点目前有很多 RAM 不会 OOM,名称节点为 4 GB,数据节点为 3 GB。
这真的是预期的行为吗?为什么节点要吃这么多内存?
我想增加节点的数量,看看我们是否可以使用更严格的内存设置运行,比如 1024 MB。可能吗?
编辑:我们看到很多 GC 发生,当 GC 发生时节点没有响应。
【问题讨论】: