Reidddddd commented on a change in pull request #3911:
URL: https://github.com/apache/hbase/pull/3911#discussion_r761613654



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/HBaseReplicationEndpoint.java
##########
@@ -242,21 +276,150 @@ public boolean isAborted() {
     if (children == null) {
       return Collections.emptyList();
     }
+
+    Configuration conf = HBaseConfiguration.create();
+
+    /** if use other balancer, return all regionservers */
+    if (!conf.get(HConstants.HBASE_MASTER_LOADBALANCER_CLASS)
+      .equals(RSGroupBasedLoadBalancer.class.getName())
+      || hostServerName == null) {
+      if(LOG.isDebugEnabled()) {
+        LOG.debug("Use replication random choose policy...");
+      }
+      return parseServerNameFromList(children);
+    } else {
+      /** if use rsgroup balancer,
+       * just return regionservers belong to the same rsgroup or default 
rsgroup */
+      if(LOG.isDebugEnabled()) {
+        LOG.debug("Use replication rsgroup choose policy...");
+      }
+      Map<String, String> serverNameHostPortMapping = new HashMap<>();
+      for (String serverName : children) {

Review comment:
       can reuse parseServerNameFromList(children) ?  then the followings can 
just user ServerName#getHost and ServerName#getPort.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to