Browse Source

MAPREDUCE-2456. Log the reduce taskID and associated TaskTrackers with
failed fetch notifications in the JobTracker log.
(Jeffrey Naisbitt via cdouglas)


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

Owen O'Malley 14 years ago
parent
commit
cd615d7715

+ 4 - 0
CHANGES.txt

@@ -20,6 +20,10 @@ Release 0.20.204.0 - unreleased
     MAPREDUCE-2535. Fix NPE in JobClient caused by retirement. (Robert Joseph
     Evans via cdouglas)
 
+    MAPREDUCE-2456. Log the reduce taskID and associated TaskTrackers with
+    failed fetch notifications in the JobTracker log.
+    (Jeffrey Naisbitt via cdouglas)
+
     HDFS-2044. TestQueueProcessingStatistics failing automatic test due to 
     timing issues. (mattf)
 

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

@@ -3262,13 +3262,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;
@@ -3280,7 +3284,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

@@ -4747,9 +4747,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);
           }
         }
       }