Selaa lähdekoodia

MAPREDUCE-3394. Add log guard for a debug message in ReduceTask. Contributed by Todd Lipcon.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security@1201983 13f79535-47bb-0310-9956-ffa450edef68
Todd Lipcon 13 vuotta sitten
vanhempi
commit
8ea31eaf22
2 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. 2 0
      CHANGES.txt
  2. 4 2
      src/mapred/org/apache/hadoop/mapred/ReduceTask.java

+ 2 - 0
CHANGES.txt

@@ -63,6 +63,8 @@ Release 0.20.206.0 - unreleased
 
     MAPREDUCE-3015. Add local dir failure info to metrics and the web UI. (eli)
 
+    MAPREDUCE-3394. Add log guard for a debug message in ReduceTask (todd)
+
 Release 0.20.205.1 - unreleased
 
   NEW FEATURES

+ 4 - 2
src/mapred/org/apache/hadoop/mapred/ReduceTask.java

@@ -2178,8 +2178,10 @@ class ReduceTask extends Task {
           } catch (InterruptedException e) { } // IGNORE
           
           while (numInFlight > 0 && mergeThrowable == null) {
-            LOG.debug(reduceTask.getTaskID() + " numInFlight = " + 
-                      numInFlight);
+            if (LOG.isDebugEnabled()) {
+              LOG.debug(reduceTask.getTaskID() + " numInFlight = " + 
+                        numInFlight);
+            }
             //the call to getCopyResult will either 
             //1) return immediately with a null or a valid CopyResult object,
             //                 or