当前位置:   article > 正文

hdfs datanode节点间balance_hdfs指定datanode节点balancer

hdfs指定datanode节点balancer

关于节点间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

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

执行./hdfs_datanode_balance.sh &

参考资料
https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html#balancer

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/728984
推荐阅读
相关标签
  

闽ICP备14008679号