阿龙学堂-hdfs存储数据倾斜
生活随笔
收集整理的這篇文章主要介紹了
阿龙学堂-hdfs存储数据倾斜
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1、現象
數據存儲傾斜現象如下所示:
2、解決辦法
配置如下參數到[hdfs-site.xml]中,然后重啟NameNode和DataNode。
需要設置參數:
dfs.datanode.balance.bandwidthPerSec=52428800 dfs.datanode.balance.max.concurrent.moves=100 dfs.balance.bandwidthPerSec=52428800 dfs.datanode.max.xcievers=16384注意:修改完該參數后,將配置信息下發到集群中的每個節點,然后需要重啟hdfs,滾動重啟即可。
3、啟動數據均衡
nohup hdfs balancer -threshold 10 > balancer.log & nohup hdfs balancer -threshold 10 > balancer.log &4、異常處理
20/07/27 17:26:56 WARN balancer.Dispatcher: Failed to move blk_1135077177_61336722 with size=46096019 from 172.16.32.10:4001:DISK to 172.16.32.9:4001:DISK through 172.16.32.13:4001 java.io.IOException: Got error, status=ERROR, status message Not able to receive block 1135077177 from /172.16.32.15:34634 because threads quota is exceeded., block move is failedat org.apache.hadoop.hdfs.protocol.datatransfer.DataTransferProtoUtil.checkBlockOpStatus(DataTransferProtoUtil.java:121)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:1056)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)at java.lang.Thread.run(Thread.java:748)出現以上異常,就說明告警信息,是線程配置低。可以調大點參數【dfs.datanode.max.xcievers】即可
在本次處理中,將【dfs.datanode.max.xcievers】的值從小修改大,示例:
總結
以上是生活随笔為你收集整理的阿龙学堂-hdfs存储数据倾斜的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 无线个人区域网WPAN 802.11局域
- 下一篇: 通达信主窗口显示股票所属板块及概念语句