You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Libo Yu <yu...@hotmail.com> on 2014/03/26 02:37:02 UTC

region locality

Hi all,

Assume there is a region X on region server A. The region already has some data
in it and there is no more new data for this region. If the hbase balancer moves 
the region X to region server B, region X loses its data locality. After it is moved to 
region server B, is there any chance that region X will be moved back to region server 
A? Thanks. 
BTW, I am talking about hbase 0.92.1cdh4.1.2. 

Libo  
 		 	   		  

Re: region locality

Posted by Bryan Beaudreault <bb...@hubspot.com>.
The balancer in 0.92.x is very naive.  It just ensures that all
regionservers will have approximately the same number of regions.
 Therefore, the answer is: "yes it is possible, but not built that way so
likely no".

0.96.x has the stochastic load balancer, which apparently takes into
account locality (as well as other factors) during balancing.  Otherwise,
you could always create your own balancer, using the HBaseAdmin
interface--move(region, location) for instance.  This is what we did, but
regrettably it is not open sourceable at this time.


On Tue, Mar 25, 2014 at 9:37 PM, Libo Yu <yu...@hotmail.com> wrote:

> Hi all,
>
> Assume there is a region X on region server A. The region already has some
> data
> in it and there is no more new data for this region. If the hbase balancer
> moves
> the region X to region server B, region X loses its data locality. After
> it is moved to
> region server B, is there any chance that region X will be moved back to
> region server
> A? Thanks.
> BTW, I am talking about hbase 0.92.1cdh4.1.2.
>
> Libo
>

Re: region locality

Posted by Esteban Gutierrez <es...@cloudera.com>.
Hello Libo,

Unfortunately it depends, but its unlikely it will happen. e.g. if your
cluster is very small and then server B is serving another table that is
causing region splits that "might" cause the master to move the region X
back to the region server A, but also depends which table balancer is
enabled.

If your use case requires a high locality it should be better to major
compact the regions on that region server after the region has moved to a
new server.

esteban.



--
Cloudera, Inc.



On Tue, Mar 25, 2014 at 6:37 PM, Libo Yu <yu...@hotmail.com> wrote:

> Hi all,
>
> Assume there is a region X on region server A. The region already has some
> data
> in it and there is no more new data for this region. If the hbase balancer
> moves
> the region X to region server B, region X loses its data locality. After
> it is moved to
> region server B, is there any chance that region X will be moved back to
> region server
> A? Thanks.
> BTW, I am talking about hbase 0.92.1cdh4.1.2.
>
> Libo
>