hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r732610 - in /hadoop/core/branches/branch-0.19: CHANGES.txt src/mapred/org/apache/hadoop/mapred/Task.java src/test/org/apache/hadoop/mapred/TestCustomOutputCommitter.java src/test/testjar/CustomOutputCommitter.java
Date Thu, 08 Jan 2009 05:25:39 GMT
Author: ddas
Date: Wed Jan  7 21:25:39 2009
New Revision: 732610

URL: http://svn.apache.org/viewvc?rev=732610&view=rev
Log:
Merge -r 732608:732609 from trunk onto 0.19 branch. Fixes HADOOP-4847.

Added:
    hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/mapred/TestCustomOutputCommitter.java
      - copied unchanged from r732609, hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestCustomOutputCommitter.java
    hadoop/core/branches/branch-0.19/src/test/testjar/CustomOutputCommitter.java
      - copied unchanged from r732609, hadoop/core/trunk/src/test/testjar/CustomOutputCommitter.java
Modified:
    hadoop/core/branches/branch-0.19/CHANGES.txt
    hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/Task.java

Modified: hadoop/core/branches/branch-0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/CHANGES.txt?rev=732610&r1=732609&r2=732610&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.19/CHANGES.txt Wed Jan  7 21:25:39 2009
@@ -35,6 +35,9 @@
     HADOOP-4821. Usage description in the Quotas guide documentations are
     incorrect. (Boris Shkolnik via hairong)
 
+    HADOOP-4847. Moves the loading of OutputCommitter to the Task.
+    (Amareshwari Sriramadasu via ddas)
+
 Release 0.19.0 - 2008-11-18
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/Task.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/Task.java?rev=732610&r1=732609&r2=732610&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/Task.java (original)
+++ hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/Task.java Wed Jan
 7 21:25:39 2009
@@ -287,18 +287,6 @@
     conf.setBoolean("mapred.task.is.map", isMapTask());
     conf.setInt("mapred.task.partition", partition);
     conf.set("mapred.job.id", taskId.getJobID().toString());
-    Path outputPath = FileOutputFormat.getOutputPath(conf);
-    if (outputPath != null) {
-      OutputCommitter committer = conf.getOutputCommitter();
-      if ((committer instanceof FileOutputCommitter)) {
-        TaskAttemptContext context = new TaskAttemptContext(conf, taskId);
-        FileOutputFormat.setWorkOutputPath(conf, 
-          ((FileOutputCommitter)committer).getTempTaskOutputPath(context));
-      } else {
-        FileOutputFormat.setWorkOutputPath(conf, outputPath);
-      }
-    }
-
   }
   
   /** Run this task as a part of the named job.  This method is executed in the
@@ -425,6 +413,15 @@
     jobContext = new JobContext(job, reporter);
     taskContext = new TaskAttemptContext(job, taskId, reporter);
     OutputCommitter committer = conf.getOutputCommitter();
+    Path outputPath = FileOutputFormat.getOutputPath(conf);
+    if (outputPath != null) {
+      if ((committer instanceof FileOutputCommitter)) {
+        FileOutputFormat.setWorkOutputPath(conf, 
+          ((FileOutputCommitter)committer).getTempTaskOutputPath(taskContext));
+      } else {
+        FileOutputFormat.setWorkOutputPath(conf, outputPath);
+      }
+    }
     committer.setupTask(taskContext);
   }
   



Mime
View raw message