Переглянути джерело

Merge -r 736242:736243 from trunk onto 0.18 branch. Fixes HADOOP-4983.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.18@736244 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 16 роки тому
батько
коміт
a174f790b2

+ 3 - 0
CHANGES.txt

@@ -141,6 +141,9 @@ Release 0.18.3 - Unreleased
 
 
     HADOOP-5077. Fix couple of JavaDoc warnings. (Raghu Angadi)
     HADOOP-5077. Fix couple of JavaDoc warnings. (Raghu Angadi)
 
 
+    HADOOP-4983. Fixes a problem in updating Counters in the status reporting.
+    (Amareshwari Sriramadasu via ddas)
+
 Release 0.18.2 - 2008-11-03
 Release 0.18.2 - 2008-11-03
 
 
   BUG FIXES
   BUG FIXES

+ 5 - 1
src/mapred/org/apache/hadoop/mapred/TaskInProgress.java

@@ -643,7 +643,11 @@ class TaskInProgress {
           if (status.getProgress() >= bestProgress) {
           if (status.getProgress() >= bestProgress) {
             bestProgress = status.getProgress();
             bestProgress = status.getProgress();
             bestState = status.getStateString();
             bestState = status.getStateString();
-            bestCounters = status.getCounters();
+            if (status.getIncludeCounters()) {
+              bestCounters = status.getCounters();
+            } else {
+              bestCounters = this.counters;
+            }
           }
           }
         }
         }
       }
       }