浏览代码

MAPREDUCE-2456. Log the reduce taskID and associated TaskTrackers with
failed fetch notifications in the JobTracker log.
Contributed by Jeffrey Naisbitt


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security@1101629 13f79535-47bb-0310-9956-ffa450edef68

Christopher Douglas 14 年之前
父节点
当前提交
7d8bb3c9d5

+ 4 - 0
CHANGES.txt

@@ -9,6 +9,10 @@ Release 0.20.205.0 - unreleased
     MAPREDUCE-2451. Log the details from health check script at the
     JobTracker. (Thomas Graves via cdouglas)
 
+    MAPREDUCE-2456. Log the reduce taskID and associated TaskTrackers with
+    failed fetch notifications in the JobTracker log.
+    (Jeffrey Naisbitt via cdouglas)
+
 Release 0.20.204.0 - unreleased
 
   BUG FIXES

+ 9 - 5
src/mapred/org/apache/hadoop/mapred/JobInProgress.java

@@ -3249,13 +3249,17 @@ public class JobInProgress {
   
   synchronized void fetchFailureNotification(TaskInProgress tip, 
                                              TaskAttemptID mapTaskId, 
-                                             String trackerName) {
+                                             String mapTrackerName,
+                                             TaskAttemptID reduceTaskId,
+                                             String reduceTrackerName) {
     Integer fetchFailures = mapTaskIdToFetchFailuresMap.get(mapTaskId);
     fetchFailures = (fetchFailures == null) ? 1 : (fetchFailures+1);
     mapTaskIdToFetchFailuresMap.put(mapTaskId, fetchFailures);
-    LOG.info("Failed fetch notification #" + fetchFailures + " for task " + 
-            mapTaskId);
-    
+    LOG.info("Failed fetch notification #" + fetchFailures + " for map task: "
+             + mapTaskId + " running on tracker: " + mapTrackerName
+             + " and reduce task: " + reduceTaskId + " running on tracker: "
+             + reduceTrackerName);
+
     float failureRate = (float)fetchFailures / runningReduceTasks;
     // declare faulty if fetch-failures >= max-allowed-failures
     boolean isMapFaulty = failureRate >= MAX_ALLOWED_FETCH_FAILURES_PERCENT;
@@ -3267,7 +3271,7 @@ public class JobInProgress {
       failedTask(tip, mapTaskId, "Too many fetch-failures",                            
                  (tip.isMapTask() ? TaskStatus.Phase.MAP : 
                                     TaskStatus.Phase.REDUCE), 
-                 TaskStatus.State.FAILED, trackerName);
+                 TaskStatus.State.FAILED, mapTrackerName);
       
       mapTaskIdToFetchFailuresMap.remove(mapTaskId);
     }

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

@@ -4750,9 +4750,11 @@ public class JobTracker implements MRConstants, InterTrackerProtocol,
             if (failedFetchTrackerName == null) {
               failedFetchTrackerName = "Lost task tracker";
             }
-            failedFetchMap.getJob().fetchFailureNotification(failedFetchMap, 
-                                                             mapTaskId, 
-                                                             failedFetchTrackerName);
+            failedFetchMap.getJob().fetchFailureNotification(failedFetchMap,
+                                                             mapTaskId,
+                                                             failedFetchTrackerName,
+                                                             taskId,
+                                                             trackerName);
           }
         }
       }