hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r659001 - in /hadoop/core/trunk: CHANGES.txt src/java/org/apache/hadoop/mapred/JobTracker.java
Date Thu, 22 May 2008 04:33:40 GMT
Author: ddas
Date: Wed May 21 21:33:39 2008
New Revision: 659001

URL: http://svn.apache.org/viewvc?rev=659001&view=rev
Log:
HADOOP-1318. Completed maps are not failed if the number of reducers are zero. Contributed
by Amareshwari Sriramadasu.

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

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=659001&r1=659000&r2=659001&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Wed May 21 21:33:39 2008
@@ -314,6 +314,9 @@
     HADOOP-3403. Fixes a problem in the JobTracker to do with handling of lost
     tasktrackers. (Arun Murthy via ddas)
 
+    HADOOP-1318. Completed maps are not failed if the number of reducers are
+    zero. (Amareshwari Sriramadasu via ddas).
+
 Release 0.17.0 - 2008-05-18
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java?rev=659001&r1=659000&r2=659001&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java Wed May 21 21:33:39
2008
@@ -2069,11 +2069,14 @@
       Set<JobInProgress> jobsWithFailures = new HashSet<JobInProgress>(); 
       for (TaskAttemptID taskId : lostTasks) {
         TaskInProgress tip = taskidToTIPMap.get(taskId);
+        JobInProgress job = tip.getJob();
 
         // Completed reduce tasks never need to be failed, because 
         // their outputs go to dfs
-        if (tip.isMapTask() || !tip.isComplete()) {
-          JobInProgress job = tip.getJob();
+        // And completed maps with zero reducers of the job 
+        // never need to be failed. 
+        if (!tip.isComplete() || 
+            (tip.isMapTask() && job.desiredReduces() != 0)) {
           // if the job is done, we don't want to change anything
           if (job.getStatus().getRunState() == JobStatus.RUNNING) {
             job.failedTask(tip, taskId, ("Lost task tracker: " + trackerName), 
@@ -2083,8 +2086,9 @@
                            TaskStatus.State.KILLED, trackerName, myMetrics);
             jobsWithFailures.add(job);
           }
-        } else if (!tip.isMapTask() && tip.isComplete()) {
-          // Completed 'reduce' task, not failed;
+        } else {
+          // Completed 'reduce' task and completed 'maps' with zero 
+          // reducers of the job, not failed;
           // only removed from data-structures.
           markCompletedTaskAttempt(trackerName, taskId);
         }



Mime
View raw message