Browse Source

Merge -r 650151:650152 from trunk to 0.17 branch. Fixes HADOOP-3279.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.17@650154 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 17 năm trước cách đây
mục cha
commit
ccfb124751
2 tập tin đã thay đổi với 6 bổ sung4 xóa
  1. 4 0
      CHANGES.txt
  2. 2 4
      src/java/org/apache/hadoop/mapred/TaskTracker.java

+ 4 - 0
CHANGES.txt

@@ -567,6 +567,10 @@ Release 0.17.0 - Unreleased
     HADOOP-3237. Fixes TestDFSShell.testErrOutPut on Windows platform.
     (Mahadev Konar via dhruba)
 
+    HADOOP-3279. TaskTracker checks for SUCCEEDED task status in addition to 
+    COMMIT_PENDING status when it fails maps due to lost map.
+    (Devaraj Das)
+
 Release 0.16.3 - 2008-04-16
 
   BUG FIXES

+ 2 - 4
src/java/org/apache/hadoop/mapred/TaskTracker.java

@@ -1847,10 +1847,8 @@ public class TaskTracker
      */
     private synchronized void mapOutputLost(String failure
                                            ) throws IOException {
-      //The check for COMMIT_PENDING should actually be a check for SUCCESS
-      //however for that, we have to introduce another Action type from the
-      //JT to the TT (SuccessTaskAction in the lines of KillTaskAction).
-      if (taskStatus.getRunState() == TaskStatus.State.COMMIT_PENDING) {
+      if (taskStatus.getRunState() == TaskStatus.State.COMMIT_PENDING || 
+          taskStatus.getRunState() == TaskStatus.State.SUCCEEDED) {
         // change status to failure
         LOG.info("Reporting output lost:"+task.getTaskId());
         taskStatus.setRunState(TaskStatus.State.FAILED);