Explorar el Código

Merge -r 757848:757849 from trunk onto 0.19 branch. Fixes HADOOP-5231.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.19@757889 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das hace 16 años
padre
commit
743692a0a5
Se han modificado 2 ficheros con 8 adiciones y 1 borrados
  1. 3 0
      CHANGES.txt
  2. 5 1
      src/mapred/org/apache/hadoop/mapred/JobTracker.java

+ 3 - 0
CHANGES.txt

@@ -86,6 +86,9 @@ Release 0.19.2 - Unreleased
     HADOOP-5554. DataNodeCluster and CreateEditsLog should create blocks with
     the same generation stamp value. (hairong via szetszwo)
 
+    HADOOP-5231. Clones the TaskStatus before passing it to the JobInProgress.
+    (Amareshwari Sriramadasu via ddas)
+
 Release 0.19.1 - 2009-02-23 
 
     HADOOP-5225. Workaround for tmp file handling in HDFS. sync() is 

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

@@ -2774,7 +2774,11 @@ public class JobTracker implements MRConstants, InterTrackerProtocol,
         
         // Update the job and inform the listeners if necessary
         JobStatus prevStatus = (JobStatus)job.getStatus().clone();
-        job.updateTaskStatus(tip, report, myInstrumentation);
+        // Clone TaskStatus object here, because JobInProgress
+        // or TaskInProgress can modify this object and
+        // the changes should not get reflected in TaskTrackerStatus.
+        // An old TaskTrackerStatus is used later in countMapTasks, etc.
+        job.updateTaskStatus(tip, (TaskStatus)report.clone(), myInstrumentation);
         JobStatus newStatus = (JobStatus)job.getStatus().clone();
         
         // Update the listeners if an incomplete job completes