You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by je...@apache.org on 2016/07/02 05:52:19 UTC

hbase git commit: HBASE-16149 Log the underlying RPC exception in RpcRetryingCallerImpl

Repository: hbase
Updated Branches:
  refs/heads/branch-1 4d7e5992c -> 24fd54729


HBASE-16149 Log the underlying RPC exception in RpcRetryingCallerImpl


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/24fd5472
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/24fd5472
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/24fd5472

Branch: refs/heads/branch-1
Commit: 24fd547292aa270a4a03b57e0a9c73bba126905b
Parents: 4d7e599
Author: Jerry He <je...@apache.org>
Authored: Fri Jul 1 14:05:25 2016 -0700
Committer: Jerry He <je...@apache.org>
Committed: Fri Jul 1 22:49:51 2016 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/client/RpcRetryingCaller.java    | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/24fd5472/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCaller.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCaller.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCaller.java
index 76261b2..6f587d1 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCaller.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCaller.java
@@ -139,16 +139,17 @@ public class RpcRetryingCaller<T> {
         throw e;
       } catch (Throwable t) {
         ExceptionUtil.rethrowIfInterrupt(t);
+
+        // translateException throws exception when should not retry: i.e. when request is bad.
+        interceptor.handleFailure(context, t);
+        t = translateException(t);
         if (tries > startLogErrorsCnt) {
           LOG.info("Call exception, tries=" + tries + ", retries=" + retries + ", started=" +
               (EnvironmentEdgeManager.currentTime() - this.globalStartTime) + " ms ago, "
               + "cancelled=" + cancelled.get() + ", msg="
-              + callable.getExceptionMessageAdditionalDetail());
+              + t.getMessage() + " " + callable.getExceptionMessageAdditionalDetail());
         }
 
-        // translateException throws exception when should not retry: i.e. when request is bad.
-        interceptor.handleFailure(context, t);
-        t = translateException(t);
         callable.throwable(t, retries != 1);
         RetriesExhaustedException.ThrowableWithExtraContext qt =
             new RetriesExhaustedException.ThrowableWithExtraContext(t,
@@ -166,7 +167,7 @@ public class RpcRetryingCaller<T> {
         long duration = singleCallDuration(expectedSleep);
         if (duration > callTimeout) {
           String msg = "callTimeout=" + callTimeout + ", callDuration=" + duration +
-              ": " + callable.getExceptionMessageAdditionalDetail();
+              ": " + t.getMessage() + " " + callable.getExceptionMessageAdditionalDetail();
           throw (SocketTimeoutException)(new SocketTimeoutException(msg).initCause(t));
         }
       } finally {