本文介绍了区域服务器上的HBase区域负载不均衡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在运行一个带有两台HBase 0.94.7区域服务器的小型集群。我发现通过区域服务器的加载请求非常不平衡。在Web UI中,我得到了:
pre $ Region1:numberOfOnlineRegions = 1,usedHeapMB = 26,maxHeapMB = 3983
Region2 :numberOfOnlineRegions = 22,usedHeapMB = 44,maxHeapMB = 3983
区域2被作为主人。我检查了负载平衡器已打开。我在主日志中找到了一些日志:
INFO org.apache.hadoop.hbase.master.LoadBalancer:跳过负载平衡因为平衡群集;服务器= 2区域= 1平均= 0.5最大负载= 1最小负载= 0
DEBUG org.apache.hadoop.hbase.master.LoadBalancer:平衡参数:numRegions = 10,numServers = 2,max = 5,min = 5
INFO org.apache.hadoop.hbase.master.LoadBalancer:以12ms计算负载平衡。将1个过载服务器上的5个区域移动到1个较少加载的服务器上
DEBUG org.apache.hadoop.hbase.master.LoadBalancer:平衡参数:numRegions = 8,numServers = 2,max = 4,min = 4
INFO org.apache.hadoop.hbase.master.LoadBalancer:以0ms计算负载平衡。将1个超载服务器上的4个区域移动到1个较少加载的服务器上
INFO org.apache.hadoop.hbase.master.LoadBalancer:因平衡群集而跳过负载平衡;服务器= 2个区域= 1平均= 0.5最多加载= 1最少加载= 0
INFO org.apache.hadoop.hbase.master.HMaster:balance hri = LogTable,\x00\x00\x01\xE8\\ \\ x00 \x00\x01 @ \x09\xB2\xBA4 $ \xC3Oe,1374591174086.65391b7a54e9c8e85a3d94bf7627fd20。,src = region2,60020,1374587851008,dest = region1,60020,1374587851018
DEBUG org.apache .hadoop.hbase.master.AssignmentManager:开始取消分配区域LogTable,\x00\x00\x01\xE8\x00\x00\x01 @ \x09\xB2\xBA4 $ \xC3Oe ,1374591174086.65391b7a54e9c8e85a3d94bf7627fd20。 (离线)
似乎负载不能从区域2到区域1平衡。我不知道这是否是配置问题?我应该检查region1的哪个参数?
谢谢
你使用顺序行键,比如时间戳?如果是这种情况,最终可能会出现 RegionServer Hotspotting ,从而给服务器带来不均衡的负载。如果可以,请避免使用顺序键。如果无法创建预分割表。
I'm running a small cluster with two region servers of HBase 0.94.7. I find that the load request over region servers is very unbalanced. From the Web UI, I got:
Region1: numberOfOnlineRegions=1, usedHeapMB=26, maxHeapMB=3983
Region2: numberOfOnlineRegions=22, usedHeapMB=44, maxHeapMB=3983
The region2 is servered as master. I checked that the load balancer is on. And I find some logs in the master log:
INFO org.apache.hadoop.hbase.master.LoadBalancer: Skipping load balancing because balanced cluster; servers=2 regions=1 average=0.5 mostloaded=1 leastloaded=0
DEBUG org.apache.hadoop.hbase.master.LoadBalancer: Balance parameter: numRegions=10, numServers=2, max=5, min=5
INFO org.apache.hadoop.hbase.master.LoadBalancer: Calculated a load balance in 12ms. Moving 5 regions off of 1 overloaded servers onto 1 less loaded servers
DEBUG org.apache.hadoop.hbase.master.LoadBalancer: Balance parameter: numRegions=8, numServers=2, max=4, min=4
INFO org.apache.hadoop.hbase.master.LoadBalancer: Calculated a load balance in 0ms. Moving 4 regions off of 1 overloaded servers onto 1 less loaded servers
INFO org.apache.hadoop.hbase.master.LoadBalancer: Skipping load balancing because balanced cluster; servers=2 regions=1 average=0.5 mostloaded=1 leastloaded=0
INFO org.apache.hadoop.hbase.master.HMaster: balance hri=LogTable,\x00\x00\x01\xE8\x00\x00\x01@\x09\xB2\xBA4$\xC3Oe,1374591174086.65391b7a54e9c8e85a3d94bf7627fd20., src=region2,60020,1374587851008, dest=region1,60020,1374587851018
DEBUG org.apache.hadoop.hbase.master.AssignmentManager: Starting unassignment of region LogTable,\x00\x00\x01\xE8\x00\x00\x01@\x09\xB2\xBA4$\xC3Oe,1374591174086.65391b7a54e9c8e85a3d94bf7627fd20. (offlining)
It seems that the load cannot be balanced from the region2 to region1. I don't know if it's a configuration problem? What parameter should I check on region1?
Thanks
解决方案
Are you using sequential rowkeys, like timestamp?If that is the case you might end up with RegionServer Hotspotting, putting uneven load on the servers. Avoid using sequential keys, if you can. If it is not possible create pre-splitted tables.
这篇关于区域服务器上的HBase区域负载不均衡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!