ソースを参照

MAPREDUCE-124. Fix a bug in failure handling of abort task of OutputCommiter. Contributed by Amareshwari Sriramadasu.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20@790544 13f79535-47bb-0310-9956-ffa450edef68
Sharad Agarwal 16 年 前
コミット
6a924dd0d0

+ 3 - 0
CHANGES.txt

@@ -161,6 +161,9 @@ Release 0.20.1 - Unreleased
 
     MAPREDUCE-179. Update progress in new RecordReaders. (cdouglas)
 
+    MAPREDUCE-124. Fix a bug in failure handling of abort task of 
+    OutputCommiter. (Amareshwari Sriramadasu via sharad)
+
 Release 0.20.0 - 2009-04-15
 
   INCOMPATIBLE CHANGES

+ 1 - 1
src/mapred/org/apache/hadoop/mapred/Task.java

@@ -790,7 +790,7 @@ abstract class Task implements Writable, Configurable {
     statusUpdate(umbilical);
     LOG.info("Runnning cleanup for the task");
     // do the cleanup
-    discardOutput(taskContext);
+    committer.abortTask(taskContext);
   }
 
   protected void runJobCleanupTask(TaskUmbilicalProtocol umbilical,

+ 1 - 0
src/test/org/apache/hadoop/mapred/TestTaskFail.java

@@ -96,6 +96,7 @@ public class TestTaskFail extends TestCase {
     // configure the mapred Job
     conf.setMapperClass(MapperClass.class);        
     conf.setReducerClass(IdentityReducer.class);
+    conf.setNumReduceTasks(0);
     FileInputFormat.setInputPaths(conf, inDir);
     FileOutputFormat.setOutputPath(conf, outDir);
     String TEST_ROOT_DIR = new Path(System.getProperty("test.build.data",