Hadoop hadoop balancer配置


hadoop版本:2.9.2

1、帶寬的設置參數: dfs.datanode.balance.bandwidthPerSec   默認值 10m

2、datanode之間數據塊的傳輸線程大小:dfs.datanode.max.transfer.threads 默認值4096

3、修改dfs.datanode.balance.max.concurrent.moves ,指定DataNode上同時用於balance待移動block的最大線程個數,這個值默認是50

如果dfs.datanode.balance.max.concurrent.moves 這個值設置不合理,balancer里面會報IO錯誤:(我這里設置的有點高了,達到了200)

java.io.IOException: Got error, status=ERROR, status message Not able to receive block 1144718791 from /10.x.x.x:53336 because threads quota is exceeded., block move is failed
at org.apache.hadoop.hdfs.protocol.datatransfer.DataTransferProtoUtil.checkBlockOpStatus(DataTransferProtoUtil.java:118)
at org.apache.hadoop.hdfs.server.balancer.Dispatcher$PendingMove.receiveResponse(Dispatcher.java:431)
at org.apache.hadoop.hdfs.server.balancer.Dispatcher$PendingMove.dispatch(Dispatcher.java:372)
at org.apache.hadoop.hdfs.server.balancer.Dispatcher$PendingMove.access$3000(Dispatcher.java:230)
at org.apache.hadoop.hdfs.server.balancer.Dispatcher$1.run(Dispatcher.java:1053)

 

 

4、如果不想在datanode設置帶寬,可以臨時設置 hdfs dfsadmin -setBalancerBandwidth 20m

 

5、啟動balancer的方法

(1)、start-balancer.sh -threshold 1

(2)、hadoop balancer -threshold  1

(3)、hadoop-daemon.sh start balancer -threshold 1


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM