hdfs数据负载均衡

2019/01/02

摘要

Hadoop集群使用久了,各个节点上的数据会变得不均衡,多的达到70,80%,少的就10,20%。

节点之间负载均衡

对hdfs负载设置均衡

hdfs dfsadmin -setBalancerBandwidth 67108864 # 设置为64M,
# 或 hdfs dfsadmin -setBalancerBandwidth 134217728 # 设置为128M,

修改默认balancer的threshold

默认balancer的threshold为10%,即各个节点存储使用率偏差不超过10%,我们可将其设置为5%

start-balancer.sh -threshold 5
# 或 start-balancer.sh –t 5%

注意 运行start-balancer.sh -threshold 5和使用hdfs balancer -threshold 5是一样的

目录