浏览代码

HADOOP-10343. Change info to debug log in LossyRetryInvocationHandler. Contributed by Arpit Gupta

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1568054 13f79535-47bb-0310-9956-ffa450edef68
Arpit Gupta 11 年之前
父节点
当前提交
2417ca71d5

+ 2 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -315,6 +315,8 @@ Release 2.4.0 - UNRELEASED
     HADOOP-10333. Fix grammatical error in overview.html document.
     HADOOP-10333. Fix grammatical error in overview.html document.
     (René Nyffenegger via suresh)
     (René Nyffenegger via suresh)
 
 
+    HADOOP-10343. Change info to debug log in LossyRetryInvocationHandler. (arpit)
+
   OPTIMIZATIONS
   OPTIMIZATIONS
 
 
   BUG FIXES
   BUG FIXES

+ 6 - 2
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/LossyRetryInvocationHandler.java

@@ -51,11 +51,15 @@ public class LossyRetryInvocationHandler<T> extends RetryInvocationHandler<T> {
     int retryCount = RetryCount.get();
     int retryCount = RetryCount.get();
     if (retryCount < this.numToDrop) {
     if (retryCount < this.numToDrop) {
       RetryCount.set(++retryCount);
       RetryCount.set(++retryCount);
-      LOG.info("Drop the response. Current retryCount == " + retryCount);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Drop the response. Current retryCount == " + retryCount);
+      }
       throw new RetriableException("Fake Exception");
       throw new RetriableException("Fake Exception");
     } else {
     } else {
-      LOG.info("retryCount == " + retryCount
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("retryCount == " + retryCount
           + ". It's time to normally process the response");
           + ". It's time to normally process the response");
+      }
       return result;
       return result;
     }
     }
   }
   }