hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yhema...@apache.org
Subject svn commit: r783672 - in /hadoop/core/trunk: CHANGES.txt src/mapred/org/apache/hadoop/mapred/TaskInProgress.java src/test/mapred/org/apache/hadoop/mapred/ControlledMapReduceJob.java
Date Thu, 11 Jun 2009 07:53:21 GMT
Author: yhemanth
Date: Thu Jun 11 07:53:20 2009
New Revision: 783672

URL: http://svn.apache.org/viewvc?rev=783672&view=rev
Log:
HADOOP-5869. Fix bug in assignment of setup / cleanup task that was causing TestQueueCapacities
to fail. Contributed by Sreekanth Ramakrishnan.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java
    hadoop/core/trunk/src/test/mapred/org/apache/hadoop/mapred/ControlledMapReduceJob.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=783672&r1=783671&r2=783672&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Jun 11 07:53:20 2009
@@ -921,6 +921,10 @@
     HADOOP-5884. Fixes accounting in capacity scheduler so that high RAM jobs
     take more slots. (Vinod Kumar Vavilapalli via yhemanth)
 
+    HADOOP-5869. Fix bug in assignment of setup / cleanup task that was
+    causing TestQueueCapacities to fail.
+    (Sreekanth Ramakrishnan via yhemanth)
+
 Release 0.20.0 - 2009-04-15
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java?rev=783672&r1=783671&r2=783672&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java Thu Jun 11 07:53:20
2009
@@ -919,18 +919,19 @@
                              boolean taskCleanup) {
     // create the task
     Task t = null;
-    if (isMapTask() && !jobSetup && !jobCleanup) {
+    if (isMapTask()) {
       LOG.debug("attempt " + numTaskFailures + " sending skippedRecords "
           + failedRanges.getIndicesCount());
-
-      t =
-          new MapTask(jobFile, taskid, partition, rawSplit.getClassName(),
-              rawSplit.getBytes());
-
-    } else if (jobSetup || jobCleanup) {
-      t = new MapTask(jobFile, taskid, partition, null, new BytesWritable());
-    }
-    else {
+      String splitClass = null;
+      BytesWritable split;
+      if (!jobSetup && !jobCleanup) {
+        splitClass = rawSplit.getClassName();
+        split = rawSplit.getBytes();
+      } else {
+        split = new BytesWritable();
+      }
+      t = new MapTask(jobFile, taskid, partition, splitClass, split);
+    } else {
       t = new ReduceTask(jobFile, taskid, partition, numMaps);
     }
     if (jobCleanup) {

Modified: hadoop/core/trunk/src/test/mapred/org/apache/hadoop/mapred/ControlledMapReduceJob.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/mapred/org/apache/hadoop/mapred/ControlledMapReduceJob.java?rev=783672&r1=783671&r2=783672&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/mapred/org/apache/hadoop/mapred/ControlledMapReduceJob.java
(original)
+++ hadoop/core/trunk/src/test/mapred/org/apache/hadoop/mapred/ControlledMapReduceJob.java
Thu Jun 11 07:53:20 2009
@@ -416,6 +416,8 @@
     conf.setInputFormat(ControlledMapReduceJob.class);
     FileInputFormat.addInputPath(conf, new Path("ignored"));
     conf.setOutputFormat(NullOutputFormat.class);
+    conf.setMapSpeculativeExecution(false);
+    conf.setReduceSpeculativeExecution(false);
 
     // Set the following for reduce tasks to be able to be started running
     // immediately along with maps.
@@ -573,4 +575,4 @@
       return new ControlledMapReduceJobRunner(conf, numMappers, numReducers);
     }
   }
-}
\ No newline at end of file
+}



Mime
View raw message