Author: yhemanth
Date: Thu Jun 11 07:58:34 2009
New Revision: 783676
URL: http://svn.apache.org/viewvc?rev=783676&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/branches/branch-0.20/CHANGES.txt
hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java
hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/mapred/ControlledMapReduceJob.java
Modified: hadoop/core/branches/branch-0.20/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/CHANGES.txt?rev=783676&r1=783675&r2=783676&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.20/CHANGES.txt Thu Jun 11 07:58:34 2009
@@ -125,6 +125,10 @@
HADOOP-5937. Correct a safemode message in FSNamesystem. (Ravi Phulari
via szetszwo)
+ 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/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java
URL:
http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java?rev=783676&r1=783675&r2=783676&view=diff
==============================================================================
---
hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java
(original)
+++
hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java
Thu Jun 11 07:58:34 2009
@@ -917,18 +917,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/branches/branch-0.20/src/test/org/apache/hadoop/mapred/ControlledMapReduceJob.java
URL:
http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/mapred/ControlledMapReduceJob.java?rev=783676&r1=783675&r2=783676&view=diff
==============================================================================
---
hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/mapred/ControlledMapReduceJob.java
(original)
+++
hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/mapred/ControlledMapReduceJob.java
Thu Jun 11 07:58:34 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
+}