Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

HBase will not balance Regions across RegionServers

avatar
Rising Star

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?

1 ACCEPTED SOLUTION

avatar
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

View solution in original post

4 REPLIES 4

avatar
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

avatar
Rising Star
Thank you Gautam, that was very helpful.

avatar
Explorer
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

avatar
Contributor

 

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.