You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by li...@apache.org on 2019/04/24 07:53:45 UTC
[hbase] branch branch-2 updated: HBASE-22283 Print row and table
information when failed to get region location
This is an automated email from the ASF dual-hosted git repository.
liyu 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 54b944a HBASE-22283 Print row and table information when failed to get region location
54b944a is described below
commit 54b944a10f012ea0649482af6063d78e7a3c12d6
Author: Yu Li <li...@apache.org>
AuthorDate: Wed Apr 24 15:44:13 2019 +0800
HBASE-22283 Print row and table information when failed to get region location
---
.../client/RpcRetryingCallerWithReadReplicas.java | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerWithReadReplicas.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerWithReadReplicas.java
index a0be0bf..260cb8c 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerWithReadReplicas.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerWithReadReplicas.java
@@ -18,6 +18,8 @@
package org.apache.hadoop.hbase.client;
+import static org.apache.hadoop.hbase.HConstants.PRIORITY_UNSET;
+
import java.io.IOException;
import java.io.InterruptedIOException;
import java.util.Collections;
@@ -34,17 +36,17 @@ import org.apache.hadoop.hbase.HBaseIOException;
import org.apache.hadoop.hbase.HRegionLocation;
import org.apache.hadoop.hbase.RegionLocations;
import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.ipc.HBaseRpcController;
+import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
import org.apache.yetus.audience.InterfaceAudience;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.apache.hadoop.hbase.ipc.HBaseRpcController;
-import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
+
import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
import org.apache.hadoop.hbase.shaded.protobuf.RequestConverter;
import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos;
-import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
-
-import static org.apache.hadoop.hbase.HConstants.PRIORITY_UNSET;
/**
* Caller that goes to replica if the primary region does no answer within a configurable
@@ -330,10 +332,12 @@ public class RpcRetryingCallerWithReadReplicas {
} catch (DoNotRetryIOException | InterruptedIOException | RetriesExhaustedException e) {
throw e;
} catch (IOException e) {
- throw new RetriesExhaustedException("Can't get the location for replica " + replicaId, e);
+ throw new RetriesExhaustedException("Cannot get the location for replica" + replicaId
+ + " of region for " + Bytes.toStringBinary(row) + " in " + tableName, e);
}
if (rl == null) {
- throw new RetriesExhaustedException("Can't get the location for replica " + replicaId);
+ throw new RetriesExhaustedException("Cannot get the location for replica" + replicaId
+ + " of region for " + Bytes.toStringBinary(row) + " in " + tableName);
}
return rl;