阿龙学堂-hdfs存储数据倾斜

本文介绍了HDFS中出现的数据存储倾斜现象,并提供了配置参数优化和数据均衡的启动方法。通过修改[hdfs-site.xml]中的参数并重启服务,可以有效解决数据倾斜问题。当遇到异常时,可以通过调整【dfs.datanode.max.xcievers】参数来解决线程配置低的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 be
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值