我对hadoop hdfs有一些问题(hadoop2.7.3)我有2个namenode(1个活动,1个备用)和3个datanode。复制因子为3。
$ hdfs dfs -df -h /
Filesystem Size Used Available Use%
hdfs://hadoop-cluster 131.0 T 51.3 T 79.5 T 39%
用过的磁盘是51t -df
命令。
$ hdfs dfs -du -h /
912.8 G /dir1
2.9 T /dir2
但用过的磁盘是3t左右的 -du
命令。
我发现其中一个数据节点的使用率达到了100%。
Live datanodes (3):
datanode1:
Configured Capacity: 48003784114176 (43.66 TB)
DFS Used: 2614091989729 (2.38 TB)
Non DFS Used: 95457946911 (88.90 GB)
DFS Remaining: 45294174318384 (41.19 TB)
DFS Used%: 5.45%
DFS Remaining%: 94.36%
*****datanode2******
Configured Capacity: 48003784114176 (43.66 TB)
DFS Used: 48003784114176 (43.66 TB)
Non DFS Used: 0
DFS Remaining: 0
DFS Used%: 100%
DFS Remaining%: 0%
datanode3:
Configured Capacity: 48003784114176 (43.66 TB)
DFS Used: 2615226250042 (2.38 TB)
Non DFS Used: 87496531142 (81.49 GB)
DFS Remaining: 45301001735984 (41.20 TB)
DFS Used%: 5.45%
DFS Remaining%: 94.37%
我的问题是
我试着去做 balancer
. 它似乎可以工作,但没有为所有迭代移动任何块,并且它的存在没有任何错误。如何平衡数据节点的磁盘使用?为什么? hdfs balancer
命令不移动任何块?
19/11/06 11:27:51 INFO balancer.Balancer: Decided to move 10 GB bytes from datanode2:DISK to datanode3:DISK
19/11/06 11:27:51 INFO balancer.Balancer: chooseStorageGroups for SAME_RACK: overUtilized => belowAvgUtilized
19/11/06 11:27:51 INFO balancer.Balancer: chooseStorageGroups for SAME_RACK: underUtilized => aboveAvgUtilized
19/11/06 11:27:51 INFO balancer.Balancer: chooseStorageGroups for ANY_OTHER: overUtilized => underUtilized
19/11/06 11:27:51 INFO balancer.Balancer: chooseStorageGroups for ANY_OTHER: overUtilized => belowAvgUtilized
19/11/06 11:27:51 INFO balancer.Balancer: chooseStorageGroups for ANY_OTHER: underUtilized => aboveAvgUtilized
19/11/06 11:27:51 INFO balancer.Balancer: Will move 10 GB in this iteration
19/11/06 11:27:51 INFO balancer.Dispatcher: Limiting threads per target to the specified max.
19/11/06 11:27:51 INFO balancer.Dispatcher: Allocating 5 threads per target.
No block has been moved for 5 iterations. Exiting...
尽管 datanode2
如果已满,则节点的状态显示为“正在使用”或“活动”或“正常”。当然,在这种情况下,我不能用hdfs编写新数据。
结果 -df
以及 -du
太不一样了。为什么?
暂无答案!
目前还没有任何答案,快来回答吧!