You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by sh...@apache.org on 2020/04/17 09:31:23 UTC

[hadoop-ozone] branch master updated: HDDS-3406. Remove RetryInvocation INFO logging from ozone CLI output (#838)

This is an automated email from the ASF dual-hosted git repository.

shashikant pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 8b4d3f5  HDDS-3406. Remove RetryInvocation INFO logging from ozone CLI output (#838)
8b4d3f5 is described below

commit 8b4d3f524cdbbd075d4b04817634c2042fcadedf
Author: Hanisha Koneru <ha...@apache.org>
AuthorDate: Fri Apr 17 02:31:17 2020 -0700

    HDDS-3406. Remove RetryInvocation INFO logging from ozone CLI output (#838)
---
 .../OzoneManagerProtocolClientSideTranslatorPB.java          | 12 ++++++++++++
 .../dist/src/shell/conf/ozone-shell-log4j.properties         |  1 +
 2 files changed, 13 insertions(+)

diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java
index cbb726a..bcc676c 100644
--- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java
+++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java
@@ -241,6 +241,9 @@ public final class OzoneManagerProtocolClientSideTranslatorPB
               getNotLeaderException(exception);
           if (notLeaderException != null &&
               notLeaderException.getSuggestedLeaderNodeId() != null) {
+            FAILOVER_PROXY_PROVIDER_LOG.info("RetryProxy: {}",
+                notLeaderException.getMessage());
+
             // TODO: NotLeaderException should include the host
             //  address of the suggested leader along with the nodeID.
             //  Failing over just based on nodeID is not very robust.
@@ -258,6 +261,8 @@ public final class OzoneManagerProtocolClientSideTranslatorPB
           // does not perform any failover.
           // So Just retry with same OM node.
           if (leaderNotReadyException != null) {
+            FAILOVER_PROXY_PROVIDER_LOG.info("RetryProxy: {}",
+                leaderNotReadyException.getMessage());
             return getRetryAction(RetryDecision.FAILOVER_AND_RETRY, failovers);
           }
         }
@@ -266,6 +271,13 @@ public final class OzoneManagerProtocolClientSideTranslatorPB
         // NotLeaderException fail over manually to the next OM Node proxy.
         // OMFailoverProxyProvider#performFailover() is a dummy call and
         // does not perform any failover.
+        String exceptionMsg;
+        if (exception.getCause() != null) {
+          exceptionMsg = exception.getCause().getMessage();
+        } else {
+          exceptionMsg = exception.getMessage();
+        }
+        FAILOVER_PROXY_PROVIDER_LOG.info("RetryProxy: {}", exceptionMsg);
         omFailoverProxyProvider.performFailoverToNextProxy();
         return getRetryAction(RetryDecision.FAILOVER_AND_RETRY, failovers);
       }
diff --git a/hadoop-ozone/dist/src/shell/conf/ozone-shell-log4j.properties b/hadoop-ozone/dist/src/shell/conf/ozone-shell-log4j.properties
index e8f5f2d..f6935d7 100644
--- a/hadoop-ozone/dist/src/shell/conf/ozone-shell-log4j.properties
+++ b/hadoop-ozone/dist/src/shell/conf/ozone-shell-log4j.properties
@@ -31,3 +31,4 @@ log4j.logger.org.apache.hadoop.util.NativeCodeLoader=ERROR
 log4j.logger.org.apache.ratis.conf.ConfUtils=WARN
 log4j.logger.org.apache.hadoop.security.ShellBasedUnixGroupsMapping=ERROR
 log4j.logger.org.apache.ratis.grpc.client.GrpcClientProtocolClient=WARN
+log4j.logger.org.apache.hadoop.io.retry.RetryInvocationHandler=WARN


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