Browse Source

HADOOP-2022. Ensure that status information for successful tasks is correctly recorded at the JobTracker, so that, for example, one may view correct information via taskdetails.jsp. This bug was introduced by HADOOP-1874. Contributed by Amar Kamat.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@583937 13f79535-47bb-0310-9956-ffa450edef68
Arun Murthy 18 years ago
parent
commit
ff576a506d
2 changed files with 8 additions and 9 deletions
  1. 5 0
      CHANGES.txt
  2. 3 9
      src/java/org/apache/hadoop/mapred/JobTracker.java

+ 5 - 0
CHANGES.txt

@@ -266,6 +266,11 @@ Trunk (unreleased changes)
     HADOOP-2026. Namenode prints out one log line for "Number of transactions"
     at most once every minute. (Dhruba Borthakur)
 
+    HADOOP-2022.  Ensure that status information for successful tasks is correctly
+    recorded at the JobTracker, so that, for example, one may view correct
+    information via taskdetails.jsp. This bug was introduced by HADOOP-1874.
+    (Amar Kamat via acmurthy)
+                                
   IMPROVEMENTS
 
     HADOOP-1908. Restructure data node code so that block sending and 

+ 3 - 9
src/java/org/apache/hadoop/mapred/JobTracker.java

@@ -1962,15 +1962,9 @@ public class JobTracker implements MRConstants, InterTrackerProtocol, JobSubmiss
                   //saving the output,the JT would have called updateTaskStatus
                   //and we don't need to call it again
                   if (status.getRunState() == TaskStatus.State.COMMIT_PENDING){
-                    newStatus = TaskStatus.createTaskStatus(
-                        tip.isMapTask(), 
-                        taskid,
-                        state == TaskStatus.State.SUCCEEDED ? 1.0f : 0.0f,
-                            state,
-                            status.getDiagnosticInfo(),
-                            status.getStateString(),
-                            status.getTaskTracker(), status.getPhase(),
-                            status.getCounters());
+                    newStatus = (TaskStatus)status.clone();
+                    newStatus.setRunState(state);
+                    newStatus.setProgress((state == TaskStatus.State.SUCCEEDED) ? 1.0f : 0.0f);
                   }
                 }
                 if (newStatus != null) {