[GitHub] [hbase] huaxiangsun commented on a diff in pull request #4442: HBASE-26649 Support meta replica LoadBalance mode for RegionLocator#g…
huaxiangsun commented on code in PR #4442: URL: https://github.com/apache/hbase/pull/4442#discussion_r877453331 ## hbase-client/src/main/java/org/apache/hadoop/hbase/ClientMetaTableAccessor.java: ## @@ -257,7 +259,37 @@ private static CompletableFuture scanMeta(AsyncTable future = new CompletableFuture(); -metaTable.scan(scan, new MetaTableScanResultConsumer(rowUpperLimit, visitor, future)); +// Get the region locator's meta replica mode. +CatalogReplicaMode metaReplicaMode = CatalogReplicaMode.fromString(metaTable.getConfiguration() + .get(LOCATOR_META_REPLICAS_MODE, CatalogReplicaMode.NONE.toString())); + +if (metaReplicaMode == CatalogReplicaMode.LOAD_BALANCE) { + addListener(metaTable.getDescriptor(), (desc, error) -> { +if (error != null) { + LOG.warn("Failed to get meta table descriptotr, error={}", error); Review Comment: We need the stacktrace, update in the new patch. -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [hbase] huaxiangsun commented on a diff in pull request #4442: HBASE-26649 Support meta replica LoadBalance mode for RegionLocator#g…
huaxiangsun commented on code in PR #4442: URL: https://github.com/apache/hbase/pull/4442#discussion_r877404672 ## hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetaRegionReplicaReplication.java: ## @@ -477,7 +495,7 @@ public void testHBaseMetaReplicaGets() throws Exception { // There are read requests increase for primary meta replica. // For rest of meta replicas, there is no change as regionMove will tell the new location - primaryIncreaseReplicaNoChange(readReqsForMetaReplicasAfterGet, + primaryIncreaseReplicaNoChange(readReqsForMetaReplicasAfterGetAllLocations, Review Comment: All locations are cached at the client side, when a region move, for a short period of time, the previous RS maintains a moved region list. Get requests to previous RS result in RegionMovedException, which has the new RS info. There is no new requests to meta replica regions in this case. -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [hbase] huaxiangsun commented on a diff in pull request #4442: HBASE-26649 Support meta replica LoadBalance mode for RegionLocator#g…
huaxiangsun commented on code in PR #4442: URL: https://github.com/apache/hbase/pull/4442#discussion_r877396560 ## hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java: ## @@ -50,6 +50,7 @@ import java.util.concurrent.TimeUnit; import org.apache.commons.lang3.ObjectUtils; import org.apache.hadoop.hbase.CatalogFamilyFormat; +import org.apache.hadoop.hbase.CatalogReplicaMode; Review Comment: Yes, since it is moved to another package, it needs to be imported. -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [hbase] huaxiangsun commented on a diff in pull request #4442: HBASE-26649 Support meta replica LoadBalance mode for RegionLocator#g…
huaxiangsun commented on code in PR #4442: URL: https://github.com/apache/hbase/pull/4442#discussion_r877395823 ## hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetaRegionReplicaReplication.java: ## @@ -385,6 +386,12 @@ private void primaryNoChangeReplicaIncrease(final long[] before, final long[] af } } + private void PrimaryIncreaseReplicaIncrease(final long[] before, final long[] after) { Review Comment: Done. -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org