huaxiangsun commented on a change in pull request #2570:
URL: https://github.com/apache/hbase/pull/2570#discussion_r510413507



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java
##########
@@ -198,6 +208,36 @@ private boolean tryComplete(LocateRequest req, 
CompletableFuture<RegionLocations
       conn.getConfiguration().getInt(LOCATE_PREFETCH_LIMIT, 
DEFAULT_LOCATE_PREFETCH_LIMIT);
     this.useMetaReplicas =
       conn.getConfiguration().getBoolean(USE_META_REPLICAS, 
DEFAULT_USE_META_REPLICAS);
+
+    if (this.useMetaReplicas) {
+      if (conn.getConfiguration()
+        .get(META_REPLICAS_MODE, 
"").equals(MetaReplicaMode.LoadBalance.toString())) {
+        this.metaReplicaMode = MetaReplicaMode.LoadBalance;
+        int numOfMetaReplicas = conn.getConfiguration().getInt(
+          META_REPLICAS_NUM, DEFAULT_META_REPLICA_NUM);
+        if (numOfMetaReplicas <= 1) {
+          LOG.error("Configured to support meta replica load balance mode,"
+            + " but there is no meta replica configured");
+          this.metaReplicaChooser = null;
+        } else {
+          String metaReplicaChooserImpl = conn.getConfiguration().get(

Review comment:
       Ok.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to