Ver código fonte

HADOOP-5280. Committing this to the 0.19 branch.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.19@748034 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 16 anos atrás
pai
commit
9f798311fb

+ 3 - 0
CHANGES.txt

@@ -10,6 +10,9 @@ Release 0.19.2 - Unreleased
     HADOOP-5269. Fixes a problem to do with tasktracker holding on to FAILED_UNCLEAN
     or KILLED_UNCLEAN tasks forever. (Amareshwari Sriramadasu via ddas) 
 
+    HADOOP-5280. Adds a check to prevent a task state transition from FAILED to
+    any of UNASSIGNED, RUNNING, COMMIT_PENDING or SUCCEEDED. (ddas)
+
 Release 0.19.1 - 2009-02-23
 
   INCOMPATIBLE CHANGES

+ 12 - 0
src/mapred/org/apache/hadoop/mapred/TaskInProgress.java

@@ -518,6 +518,18 @@ class TaskInProgress {
            oldState == TaskStatus.State.COMMIT_PENDING)) {
         return false;
       }
+      
+      //This is to handle the case of the JobTracker timing out a task
+      //due to launch delay, but the TT comes back with one of the 
+      //states mentioned in the newState
+      if (oldState == TaskStatus.State.FAILED && 
+          (newState == TaskStatus.State.UNASSIGNED ||
+           newState == TaskStatus.State.RUNNING || 
+           newState == TaskStatus.State.COMMIT_PENDING ||
+           newState == TaskStatus.State.SUCCEEDED)) {
+        tasksToKill.put(taskid, true);
+        return false;	  
+      }
           
       changed = oldState != newState;
     }