From da80c4da41e555929b9432da7e999e27468efcf5 Mon Sep 17 00:00:00 2001 From: Ivan Mitic Date: Sun, 19 Oct 2014 23:57:12 -0400 Subject: [PATCH] Revert "MAPREDUCE-5911. Terasort TeraOutputFormat does not check for output directory existance. Contributed by Bruno P. Kinoshita." This reverts commit 7bbda6ef92e9bf4a28e67b8736067b38defab51e. --- hadoop-mapreduce-project/CHANGES.txt | 3 --- .../apache/hadoop/examples/terasort/TeraOutputFormat.java | 6 ------ 2 files changed, 9 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 1c6a631a93..e152b480bc 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -438,9 +438,6 @@ Release 2.6.0 - UNRELEASED MAPREDUCE-5542. Killing a job just as it finishes can generate an NPE in client (Rohith via jlowe) - MAPREDUCE-5911. Terasort TeraOutputFormat does not check for output - directory existance (Bruno P. Kinoshita via ivanmi) - Release 2.5.1 - 2014-09-05 INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/terasort/TeraOutputFormat.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/terasort/TeraOutputFormat.java index 248392a95f..872e71917b 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/terasort/TeraOutputFormat.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/terasort/TeraOutputFormat.java @@ -24,7 +24,6 @@ import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.Text; -import org.apache.hadoop.mapred.FileAlreadyExistsException; import org.apache.hadoop.mapred.InvalidJobConfException; import org.apache.hadoop.mapreduce.JobContext; import org.apache.hadoop.mapreduce.OutputCommitter; @@ -91,11 +90,6 @@ public void checkOutputSpecs(JobContext job // get delegation token for outDir's file system TokenCache.obtainTokensForNamenodes(job.getCredentials(), new Path[] { outDir }, job.getConfiguration()); - - if (outDir.getFileSystem(job.getConfiguration()).exists(outDir)) { - throw new FileAlreadyExistsException("Output directory " + outDir + - " already exists"); - } } public RecordWriter getRecordWriter(TaskAttemptContext job