Browse Source

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.20@736248 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 16 years ago
parent
commit
06191d8c7d
2 changed files with 8 additions and 1 deletions
  1. 3 0
      CHANGES.txt
  2. 5 1
      src/mapred/org/apache/hadoop/mapred/TaskInProgress.java

+ 3 - 0
CHANGES.txt

@@ -1715,6 +1715,9 @@ Release 0.18.3 - Unreleased
     HADOOP-4910. NameNode should exclude replicas when choosing excessive
     replicas to delete to avoid data lose. (hairong)
 
+    HADOOP-4983. Fixes a problem in updating Counters in the status reporting.
+    (Amareshwari Sriramadasu via ddas)
+
 Release 0.18.2 - 2008-11-03
 
   BUG FIXES

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

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