This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new 437b3130bf4 HBASE-29191 Use MetaRpcReadTimeout when accessing Meta
replicas (#6802)
437b3130bf4 is described below
commit 437b3130bf4d3bae261654bf3efe5ca42dbfb112
Author: YR <[email protected]>
AuthorDate: Fri Apr 11 21:34:50 2025 +0800
HBASE-29191 Use MetaRpcReadTimeout when accessing Meta replicas (#6802)
Signed-off-by: Duo Zhang <[email protected]>
---
.../org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java | 2 +-
.../java/org/apache/hadoop/hbase/client/ConnectionImplementation.java | 2 +-
.../hbase/client/TestCatalogReplicaLoadBalanceSimpleSelector.java | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java
index 4c770dc914a..d97f0105878 100644
---
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java
+++
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncNonMetaRegionLocator.java
@@ -234,7 +234,7 @@ class AsyncNonMetaRegionLocator {
int numOfReplicas =
CatalogReplicaLoadBalanceSelector.UNINITIALIZED_NUM_OF_REPLICAS;
try {
RegionLocations metaLocations =
conn.registry.getMetaRegionLocations()
- .get(conn.connConf.getReadRpcTimeoutNs(),
TimeUnit.NANOSECONDS);
+ .get(conn.connConf.getMetaReadRpcTimeoutNs(),
TimeUnit.NANOSECONDS);
numOfReplicas = metaLocations.size();
} catch (Exception e) {
LOG.error("Failed to get table {}'s region replication, ",
META_TABLE_NAME, e);
diff --git
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
index 05ade72e20c..c945b1d0a00 100644
---
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
+++
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
@@ -411,7 +411,7 @@ public class ConnectionImplementation implements
ClusterConnection, Closeable {
int numOfReplicas = 1;
try {
RegionLocations metaLocations =
this.registry.getMetaRegionLocations()
- .get(connectionConfig.getReadRpcTimeout(),
TimeUnit.MILLISECONDS);
+ .get(connectionConfig.getMetaReadRpcTimeout(),
TimeUnit.MILLISECONDS);
numOfReplicas = metaLocations.size();
} catch (Exception e) {
LOG.error("Failed to get table {}'s region replication, ",
META_TABLE_NAME, e);
diff --git
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestCatalogReplicaLoadBalanceSimpleSelector.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestCatalogReplicaLoadBalanceSimpleSelector.java
index 7f54a667f5d..ddce1df1e2d 100644
---
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestCatalogReplicaLoadBalanceSimpleSelector.java
+++
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestCatalogReplicaLoadBalanceSimpleSelector.java
@@ -99,7 +99,7 @@ public class TestCatalogReplicaLoadBalanceSimpleSelector {
int numOfReplicas =
CatalogReplicaLoadBalanceSelector.UNINITIALIZED_NUM_OF_REPLICAS;
try {
RegionLocations metaLocations =
CONN.registry.getMetaRegionLocations()
- .get(CONN.connConf.getReadRpcTimeoutNs(), TimeUnit.NANOSECONDS);
+ .get(CONN.connConf.getMetaReadRpcTimeoutNs(),
TimeUnit.NANOSECONDS);
numOfReplicas = metaLocations.size();
} catch (Exception e) {
LOG.error("Failed to get table {}'s region replication, ",
META_TABLE_NAME, e);
@@ -126,7 +126,7 @@ public class TestCatalogReplicaLoadBalanceSimpleSelector {
int numOfReplicas =
CatalogReplicaLoadBalanceSelector.UNINITIALIZED_NUM_OF_REPLICAS;
try {
RegionLocations metaLocations =
CONN.registry.getMetaRegionLocations()
- .get(CONN.connConf.getReadRpcTimeoutNs(), TimeUnit.NANOSECONDS);
+ .get(CONN.connConf.getMetaReadRpcTimeoutNs(),
TimeUnit.NANOSECONDS);
numOfReplicas = metaLocations.size();
} catch (Exception e) {
LOG.error("Failed to get table {}'s region replication, ",
META_TABLE_NAME, e);