hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-16149 Log the underlying RPC exception in RpcRetryingCallerImpl (Jerry He)
Date Thu, 30 Jun 2016 12:57:59 GMT
Repository: hbase
Updated Branches:
  refs/heads/master e2566eb0e -> 2d93444cb


HBASE-16149 Log the underlying RPC exception in RpcRetryingCallerImpl (Jerry He)


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

Branch: refs/heads/master
Commit: 2d93444cb0afad533c0a744cad296ef8fcfff5d2
Parents: e2566eb
Author: stack <stack@apache.org>
Authored: Thu Jun 30 05:57:39 2016 -0700
Committer: stack <stack@apache.org>
Committed: Thu Jun 30 05:57:50 2016 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/client/RpcRetryingCallerImpl.java      | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/2d93444c/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerImpl.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerImpl.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerImpl.java
index 8f28796..cc2f159 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerImpl.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerImpl.java
@@ -104,16 +104,18 @@ public class RpcRetryingCallerImpl<T> implements 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 + ", maxAttempts=" + maxAttempts + ",
started="
               + (EnvironmentEdgeManager.currentTime() - tracker.getStartTime()) + " 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, maxAttempts != 1);
         RetriesExhaustedException.ThrowableWithExtraContext qt =
             new RetriesExhaustedException.ThrowableWithExtraContext(t,
@@ -131,7 +133,7 @@ public class RpcRetryingCallerImpl<T> implements 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 {


Mime
View raw message