我们有HDP版本- 2.6.4。在datanode机器上,我们可以看到hdfs数据是不平衡的。在一些磁盘上,我们有不同的大小
sdb 11G
and
sdd 17G
/dev/sdd 20G 3.0G 17G 15% /grid/sdd
/dev/sdb 20G 11G 9.3G 53% /grid/sdb <-- Why disks are not balanced?
在谷歌搜索之后,我找到了以下CLI (来自https://community.hortonworks.com/questions/19694/help-with-exception-from-hdfs-balancer.html )
hdfs balancer -Ddfs.balancer.movedWinWidth=5400000 -Ddfs.balancer.moverThreads=1000 -Ddfs.balancer.dispatcherThreads=200 -Ddfs.datanode.balance.bandwidthPerSec=100000000 -Ddfs.balancer.max-size-to-move=10737418240 -threshold 20 1>/tmp/balancer-out.log 2>/tmp/balancer-debug.log
在我运行它之后,我们得到相同的hdfs大小
/dev/sdd 20G 3.0G 17G 15% /grid/sdd
/dev/sdb 20G 11G 9.3G 53% /grid/sdb
more /tmp/balancer-out.log Time Stamp Iteration# Bytes Already Moved Bytes Left To Move Bytes Being Moved The cluster is balanced. Exiting... Mar 7, 2019 5:02:34 PM 0 0 B 0 B 0 B Mar 7, 2019 5:02:34 PM Balancing took 1.453 seconds
因此,实际上,在hdfs中,我们看不到磁盘平衡方面的任何差异。
如何平衡hdfs数据,使所有磁盘都具有相同的使用大小?
发布于 2020-02-28 10:07:18
我不是这方面的专家,我才刚开始研究。我怀疑你应该使用的是hdfs磁盘平衡器,而不是平衡器。
https://stackoverflow.com/questions/55064282
复制相似问题