From cad9bc8843d08ecb18fa058169207d47bcea9bdb Mon Sep 17 00:00:00 2001 From: Arun Murthy Date: Wed, 19 Oct 2011 20:28:49 +0000 Subject: [PATCH] Merge -c 1186458 from trunk to branch-0.23 to complete fix for MAPREDUCE-3181. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1186459 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../hadoop/mapreduce/util/ConfigUtil.java | 2 ++ .../examples/terasort/TeraOutputFormat.java | 22 +------------------ 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index fa0412891fb..50bdad02c87 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -1635,6 +1635,9 @@ Release 0.23.0 - Unreleased MAPREDUCE-3176. Fixed ant mapreduce tests that are timing out because of wrong framework name. (Hitesh Shah via vinodkv) + MAPREDUCE-3181. Fixed MapReduce runtime to load yarn-default.xml and + yarn-site.xml. (acmurthy) + Release 0.22.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/util/ConfigUtil.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/util/ConfigUtil.java index 7d9a92fcd94..e4cef59ef40 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/util/ConfigUtil.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/util/ConfigUtil.java @@ -40,6 +40,8 @@ public class ConfigUtil { addDeprecatedKeys(); Configuration.addDefaultResource("mapred-default.xml"); Configuration.addDefaultResource("mapred-site.xml"); + Configuration.addDefaultResource("yarn-default.xml"); + Configuration.addDefaultResource("yarn-site.xml"); } /** diff --git a/hadoop-mapreduce-project/src/examples/org/apache/hadoop/examples/terasort/TeraOutputFormat.java b/hadoop-mapreduce-project/src/examples/org/apache/hadoop/examples/terasort/TeraOutputFormat.java index 2796ba67bd2..1900e117f5a 100644 --- a/hadoop-mapreduce-project/src/examples/org/apache/hadoop/examples/terasort/TeraOutputFormat.java +++ b/hadoop-mapreduce-project/src/examples/org/apache/hadoop/examples/terasort/TeraOutputFormat.java @@ -29,7 +29,6 @@ import org.apache.hadoop.mapreduce.JobContext; import org.apache.hadoop.mapreduce.OutputCommitter; import org.apache.hadoop.mapreduce.RecordWriter; import org.apache.hadoop.mapreduce.TaskAttemptContext; -import org.apache.hadoop.mapreduce.TaskType; import org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; @@ -100,28 +99,9 @@ public class TeraOutputFormat extends FileOutputFormat { throws IOException { if (committer == null) { Path output = getOutputPath(context); - committer = new TeraOutputCommitter(output, context); + committer = new FileOutputCommitter(output, context); } return committer; } - public static class TeraOutputCommitter extends FileOutputCommitter { - - public TeraOutputCommitter(Path outputPath, TaskAttemptContext context) - throws IOException { - super(outputPath, context); - } - - @Override - public void commitJob(JobContext jobContext) { - } - - @Override - public void setupJob(JobContext jobContext) { - } - - @Override - public void setupTask(TaskAttemptContext taskContext) { - } - } }