赞
踩
关于节点间balance,用hdfs用户执行
#!/bin/bash
File_Path=$(cd "$(dirname "$0")";pwd)
Balance_Time=`date +%Y-%m-%d-%H`
Balance_Threshold=5 ##节点间差值
BalancerBandwidth=500000000 ##500M
kinit -kt /etc/hadoop/hdfs.keytab hdfs/`hostname -f` -r 7d
hdfs dfsadmin -setBalancerBandwidth $BalancerBandwidth
hdfs balancer -threshold $Balance_Threshold > $File_Path/datanode_balancer.log_$Balance_Time 2>&1
执行./hdfs_datanode_balance.sh &
参考资料
https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html#balancer
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。