[
https://issues.apache.org/jira/browse/HBASE-20578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16473764#comment-16473764
]
Albert Lee commented on HBASE-20578:
------------------------------------
OK Ted.
First step read the configuration of souce cluster to know whether this cluster
use GroupBasedLoadBalancer, if don't use it, chooseSinks in default way. if use
group balance, use GroupAdmin in HBaseReplicationEndpoint to find which group
the source regionserver belong to. Then read target cluster zk path like
/hbase/groupInfo to find whether target cluster has the same name rs group. If
target cluster has it, return the same name group servers, if not, return
default group servers. So ReplicationSinkManager.chooseSinks can use
replication.source.ratio and random like before.
So far I completed what I said above but with a small bug. I haven't found how
to use HRegionServer.getServerName in HBaseReplicationEndpoint(I use
InetAddress.getLocalhHost().getHostName() with HConstants.REGIONSERVER_PORT to
construct Address instead temporary until find the right way), so that if one
machine start mulitple regionservers (for example, use minicluster) and these
regionservers in different group, HBaseReplicationEndpoint will can't get the
right groupname. If one machine just start one regionserver, the patch can work
normally already.
> Support region server group in target cluster
> ---------------------------------------------
>
> Key: HBASE-20578
> URL: https://issues.apache.org/jira/browse/HBASE-20578
> Project: HBase
> Issue Type: Sub-task
> Reporter: Ted Yu
> Assignee: Albert Lee
> Priority: Major
>
> When source tables belong to non-default region server group(s) and there are
> region server group counterpart in the target cluster, we should support
> restoring to target cluster using the region server group mapping.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)