소스 검색

HADOOP-1036. Improve exception handling in TaskTracker to keep tasks from being lost. Contributed by Arun.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@512006 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 년 전
부모
커밋
cb81db8b6c
2개의 변경된 파일11개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 0
      CHANGES.txt
  2. 8 2
      src/java/org/apache/hadoop/mapred/TaskTracker.java

+ 3 - 0
CHANGES.txt

@@ -144,6 +144,9 @@ Trunk (unreleased changes)
 42. HADOOP-1027.  Fix problems with in-memory merging during shuffle
     and re-enable this optimization.  (Devaraj Das via cutting)
 
+43. HADOOP-1036.  Fix exception handling in TaskTracker to keep tasks
+    from being lost.  (Arun C Murthy via cutting)
+
 
 Release 0.11.2 - 2007-02-16
 

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

@@ -860,9 +860,9 @@ public class TaskTracker
       }
       try {
     	  localizeJob(tip);
-      } catch (IOException ie) {
+      } catch (Throwable e) {
         String msg = ("Error initializing " + tip.getTask().getTaskId() + 
-                      ":\n" + StringUtils.stringifyException(ie));
+                      ":\n" + StringUtils.stringifyException(e));
         LOG.warn(msg);
         tip.reportDiagnosticInfo(msg);
         try {
@@ -871,6 +871,12 @@ public class TaskTracker
           LOG.info("Error cleaning up " + tip.getTask().getTaskId() + ":\n" +
                    StringUtils.stringifyException(ie2));          
         }
+        
+        // Careful! 
+        // This might not be an 'Exception' - don't handle 'Error' here!
+        if (e instanceof Error) {
+          throw ((Error) e);
+        }
       }
     }