hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From junping...@apache.org
Subject hadoop git commit: YARN-6145. Improve log message on fail over. Contributed by Jian He. (cherry picked from commit eec52e158b7bc14b2d3d53512323ba05e15e09e3)
Date Wed, 08 Feb 2017 10:21:02 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 127ed38d1 -> 33e7c3044


YARN-6145. Improve log message on fail over. Contributed by Jian He.
(cherry picked from commit eec52e158b7bc14b2d3d53512323ba05e15e09e3)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/33e7c304
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/33e7c304
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/33e7c304

Branch: refs/heads/branch-2
Commit: 33e7c3044f6d60db4c09b5f61aa0f53062a96579
Parents: 127ed38
Author: Junping Du <junping_du@apache.org>
Authored: Wed Feb 8 02:11:19 2017 -0800
Committer: Junping Du <junping_du@apache.org>
Committed: Wed Feb 8 02:15:11 2017 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/io/retry/RetryInvocationHandler.java   | 8 +++++---
 .../src/main/java/org/apache/hadoop/ipc/Client.java          | 6 ++++--
 .../yarn/client/RequestHedgingRMFailoverProxyProvider.java   | 6 ++++--
 3 files changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/33e7c304/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryInvocationHandler.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryInvocationHandler.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryInvocationHandler.java
index c657d20..8487602 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryInvocationHandler.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryInvocationHandler.java
@@ -130,7 +130,9 @@ public class RetryInvocationHandler<T> implements RpcInvocationHandler
{
           Thread.sleep(retryInfo.delay);
         } catch (InterruptedException e) {
           Thread.currentThread().interrupt();
-          LOG.warn("Interrupted while waiting to retry", e);
+          if (LOG.isDebugEnabled()) {
+            LOG.debug("Interrupted while waiting to retry", e);
+          }
           InterruptedIOException intIOE = new InterruptedIOException(
               "Retry interrupted");
           intIOE.initCause(e);
@@ -375,7 +377,7 @@ public class RetryInvocationHandler<T> implements RpcInvocationHandler
{
     }
 
     final StringBuilder b = new StringBuilder()
-        .append("Exception while invoking ")
+        .append(ex + ", while invoking ")
         .append(proxyDescriptor.getProxyInfo().getString(method.getName()));
     if (failovers > 0) {
       b.append(" after ").append(failovers).append(" failover attempts");
@@ -384,7 +386,7 @@ public class RetryInvocationHandler<T> implements RpcInvocationHandler
{
     b.append(delay > 0? "after sleeping for " + delay + "ms.": "immediately.");
 
     if (info) {
-      LOG.info(b.toString(), ex);
+      LOG.info(b.toString());
     } else {
       LOG.debug(b.toString(), ex);
     }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/33e7c304/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
index 1f2b607..5d3f22f 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
@@ -912,8 +912,10 @@ public class Client implements AutoCloseable {
       }
       if (action.action == RetryAction.RetryDecision.FAIL) {
         if (action.reason != null) {
-          LOG.warn("Failed to connect to server: " + server + ": "
-              + action.reason, ioe);
+          if (LOG.isDebugEnabled()) {
+            LOG.debug("Failed to connect to server: " + server + ": "
+                    + action.reason, ioe);
+          }
         }
         throw ioe;
       }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/33e7c304/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/RequestHedgingRMFailoverProxyProvider.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/RequestHedgingRMFailoverProxyProvider.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/RequestHedgingRMFailoverProxyProvider.java
index 9468f4e..13c02af 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/RequestHedgingRMFailoverProxyProvider.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/RequestHedgingRMFailoverProxyProvider.java
@@ -144,6 +144,8 @@ public class RequestHedgingRMFailoverProxyProvider<T>
             args);
       }
 
+      LOG.info("Looking for the active RM in " + Arrays.toString(rmServiceIds)
+          + "...");
       ExecutorService executor = null;
       CompletionService<Object> completionService;
       try {
@@ -166,7 +168,7 @@ public class RequestHedgingRMFailoverProxyProvider<T>
         Object retVal;
         try {
           retVal = callResultFuture.get();
-          LOG.info("Invocation successful on [" + pInfo + "]");
+          LOG.info("Found active RM [" + pInfo + "]");
           return retVal;
         } catch (Exception ex) {
           // Throw exception from first responding RM so that clients can handle
@@ -192,7 +194,7 @@ public class RequestHedgingRMFailoverProxyProvider<T>
 
   @Override
   public void performFailover(T currentProxy) {
-    LOG.info("Connection lost, trying to fail over.");
+    LOG.info("Connection lost with " + successfulProxy + ", trying to fail over.");
     successfulProxy = null;
   }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message