This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.5 by this push:
new d538e0b1605 HBASE-29191 Use MetaRpcReadTimeout when accessing Meta
replicas (#6802)
d538e0b1605 is described below
commit d538e0b160586acd607e4d43039b64173cc13f0d
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]>
(cherry picked from commit 437b3130bf4d3bae261654bf3efe5ca42dbfb112)
---
.../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 a85753fcc79..b8dc1d50b92 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
@@ -377,7 +377,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 f83438578b6..e79d2c71750 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);