hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r758156 - in /hadoop/core/trunk: CHANGES.txt src/mapred/org/apache/hadoop/mapred/TaskInProgress.java
Date Wed, 25 Mar 2009 06:21:38 GMT
Author: ddas
Date: Wed Mar 25 06:21:36 2009
New Revision: 758156

URL: http://svn.apache.org/viewvc?rev=758156&view=rev
Log:
HADOOP-5374. Fixes a NPE problem in getTasksToSave method. Contributed by Amareshwari Sriramadasu.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=758156&r1=758155&r2=758156&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Wed Mar 25 06:21:36 2009
@@ -1156,6 +1156,9 @@
     HADOOP-4719. Fix documentation of 'ls' format for FsShell. (Ravi Phulari
     via cdouglas)
 
+    HADOOP-5374. Fixes a NPE problem in getTasksToSave method.
+    (Amareshwari Sriramadasu via ddas)
+
 Release 0.19.1 - 2009-02-23 
 
   IMPROVEMENTS

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java?rev=758156&r1=758155&r2=758156&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java Wed Mar 25 06:21:36
2009
@@ -418,7 +418,8 @@
    * Returns whether the task attempt should be committed or not 
    */
   public boolean shouldCommit(TaskAttemptID taskid) {
-    return !isComplete() && taskToCommit.equals(taskid);
+    return !isComplete() && isCommitPending(taskid) && 
+           taskToCommit.equals(taskid);
   }
 
   /**
@@ -540,14 +541,12 @@
         return false;
       }
       
+      //Do not accept any status once the task is marked FAILED/KILLED
       //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)) {
+      //due to launch delay, but the TT comes back with any state or 
+      //TT got expired
+      if (oldState == TaskStatus.State.FAILED ||
+          oldState == TaskStatus.State.KILLED) {
         tasksToKill.put(taskid, true);
         return false;	  
       }



Mime
View raw message