From 2417ca71d5115f16bd13a737087dab5edd04fb99 Mon Sep 17 00:00:00 2001 From: Arpit Gupta Date: Thu, 13 Feb 2014 21:52:56 +0000 Subject: [PATCH] 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 --- hadoop-common-project/hadoop-common/CHANGES.txt | 2 ++ .../hadoop/io/retry/LossyRetryInvocationHandler.java | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 7bfad34929..f14c33a1da 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/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. (René Nyffenegger via suresh) + HADOOP-10343. Change info to debug log in LossyRetryInvocationHandler. (arpit) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/LossyRetryInvocationHandler.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/LossyRetryInvocationHandler.java index bdb6a614ef..7a557c477c 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/LossyRetryInvocationHandler.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/LossyRetryInvocationHandler.java @@ -51,11 +51,15 @@ protected Object invokeMethod(Method method, Object[] args) throws Throwable { int retryCount = RetryCount.get(); if (retryCount < this.numToDrop) { 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"); } else { - LOG.info("retryCount == " + retryCount + if (LOG.isDebugEnabled()) { + LOG.debug("retryCount == " + retryCount + ". It's time to normally process the response"); + } return result; } }