[ 
https://issues.apache.org/jira/browse/HBASE-10576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

rajeshbabu updated HBASE-10576:
-------------------------------

    Attachment: HBASE-10576.patch

Here is the custom load balancer ensures co-location of user table regions and 
correponding index table regions.
It is wrapper over normal load balancer like StochasticLoadBalancer or any other
which can be configurable(the configuration is 
hbase.index.balancer.delegator.class).

*Before creating index table we should add both user table and index table to 
balancer. 
We may need to populate user table region locations from master to balancer.
{code}
IndexLoadBalancer#addTablesToColocate();
IndexLoadBalancer#populateRegionLocations();
{code}

*Similary while droping table we can remove the tables from colocation
{code}
IndexLoadBalancer#removeTablesFromColocation().
{code}
The above steps can be done through master coprocessor hooks because no direct 
client APIs for this.
Hooks implemented in TestIndexLoadBalancer.MockedMasterObserver gives some 
basic idea.

*We need set parent table attribute to index table descriptor to repopulate 
tables to colocate on master startup.
{code}
htd.setValue(IndexLoadBalancer.PARENT_TABLE_KEY, userTableName.toBytes());
{code}


> Custom load balancer to co-locate the regions of two tables which are having 
> same split keys
> --------------------------------------------------------------------------------------------
>
>                 Key: HBASE-10576
>                 URL: https://issues.apache.org/jira/browse/HBASE-10576
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Balancer
>            Reporter: rajeshbabu
>            Assignee: rajeshbabu
>         Attachments: HBASE-10576.patch
>
>
> To support local indexing both user table and index table should have same 
> split keys. This issue to provide custom balancer to colocate the regions of 
> two tables which are having same split keys. 
> This helps in Phoenix as well.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to