Reply
Highlighted
Expert Contributor
Posts: 62
Registered: ‎06-03-2014
Accepted Solution

HBase will not balance Regions across RegionServers

I run CDH 5.2 and have an odd problem. I am running HBase with seven RegionServers and 1200 Regions, but the bulk of the Regions are running on two or three of the RegionServers instead of balancing across all Regions. This leads to a problem where two of the RegionServers run out of memory and fail the Java processes, while the other RegionServers sit idle. Is there a command I can run to balance the Regions across all RegionServers?

Cloudera Employee
Posts: 576
Registered: ‎01-20-2014

Re: HBase will not balance Regions across RegionServers

HBase does include a balancer. Note however that it balances based on
number of regions, not their size or traffic. So it is still possible that
a regionserver ends up with more larger/busier regions than other
regionservers. If you notice this behaviour, you can always manually
reassign a region using the HBase Shell.

http://hbase.apache.org/book/node.management.html#lb

Regards,
Gautam Gopalakrishnan
Cloudera Support
Expert Contributor
Posts: 62
Registered: ‎06-03-2014

Re: HBase will not balance Regions across RegionServers

Thank you Gautam, that was very helpful.
New Contributor
Posts: 1
Registered: ‎12-23-2017

Re: HBase will not balance Regions across RegionServers

I have the same problem, i don’t known how to balance region on region sever .my system have 12 rs:
- 6 server contain 10 region/ region sever
- 6 sever contain 115 region/ region server
Please help me
Cloudera Employee
Posts: 5
Registered: ‎10-03-2017

Re: HBase will not balance Regions across RegionServers

 

I am just sharing the relevant part of the linked docs, as they contain the instructions on how to enable the hbase balancer via hbase shell:

 

Load Balancer

It is assumed that the Region Load Balancer is disabled while the graceful_stop script runs (otherwise the balancer and the decommission script will end up fighting over region deployments). Use the shell to disable the balancer:

hbase(main):001:0> balance_switch false
true
0 row(s) in 0.3590 seconds

This turns the balancer OFF. To reenable, do:

hbase(main):001:0> balance_switch true
false
0 row(s) in 0.3590 seconds

The graceful_stop will check the balancer and if enabled, will turn it off before it goes to work. If it exits prematurely because of error, it will not have reset the balancer. Hence, it is better to manage the balancer apart from graceful_stopreenabling it after you are done w/ graceful_stop.

Announcements