當(dāng)前位置:
首頁(yè) >
阿龙学堂-hdfs存储数据倾斜
發(fā)布時(shí)間:2023/12/14
45
豆豆
生活随笔
收集整理的這篇文章主要介紹了
阿龙学堂-hdfs存储数据倾斜
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
1、現(xiàn)象
數(shù)據(jù)存儲(chǔ)傾斜現(xiàn)象如下所示:
2、解決辦法
配置如下參數(shù)到[hdfs-site.xml]中,然后重啟NameNode和DataNode。
需要設(shè)置參數(shù):
dfs.datanode.balance.bandwidthPerSec=52428800 dfs.datanode.balance.max.concurrent.moves=100 dfs.balance.bandwidthPerSec=52428800 dfs.datanode.max.xcievers=16384注意:修改完該參數(shù)后,將配置信息下發(fā)到集群中的每個(gè)節(jié)點(diǎn),然后需要重啟hdfs,滾動(dòng)重啟即可。
3、啟動(dòng)數(shù)據(jù)均衡
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)出現(xiàn)以上異常,就說(shuō)明告警信息,是線程配置低。可以調(diào)大點(diǎn)參數(shù)【dfs.datanode.max.xcievers】即可
在本次處理中,將【dfs.datanode.max.xcievers】的值從小修改大,示例:
總結(jié)
以上是生活随笔為你收集整理的阿龙学堂-hdfs存储数据倾斜的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 无线个人区域网WPAN 802.11局域
- 下一篇: 通达信主窗口显示股票所属板块及概念语句