hdfs的balancer

参考:

https://blog.csdn.net/mnasd/article/details/80369603

在CDH中选一个资源多的节点,安装

HDFS->添加角色到实例

 启动后状态是灰的

在做平衡之前,可做相关参数调整:

在hdfs的配置中输入balancer
dfs.datanode.balance.max.concurrent.moves #默认50
dfs.balancer.max-size-to-move 10G #各节点差异超过10G就平衡
Balancer 的 Java 堆栈大小 默认1G #可增加到2G

不过没关系,点进去在操作中选择重新平衡

实际上就是在该节点上运行hdfs.sh  balancer.

 注: 也可在该节点上手动执行命令: 

hdfs balancer -policy datanode -threshold 30 -include -f /tmp/hdfs-blancer.txt

#tmp/hdfs-blancer.txt 写上想要执行平衡节点的hostname.

原文地址:https://www.cnblogs.com/hongfeng2019/p/11435176.html