From 58f72f035fde57aa0010dc8eae2ef89e62297eab Mon Sep 17 00:00:00 2001 From: Todd Lipcon Date: Sun, 20 May 2012 07:41:37 +0000 Subject: [PATCH] MAPREDUCE-4002. MultiFileWordCount job fails if the input path is not from default file system. Contributed by Bhallamudi Venkata Siva Kamesh. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1340629 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/examples/MultiFileWordCount.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 2ea6aac7993..75bd324e373 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -18,6 +18,9 @@ Release 2.0.1-alpha - UNRELEASED MAPREDUCE-4250. hadoop-config.sh missing variable exports, causes Yarn jobs to fail with ClassNotFoundException MRAppMaster. (phunt via tucu) + MAPREDUCE-4002. MultiFileWordCount job fails if the input path is not + from default file system. (Bhallamudi Venkata Siva Kamesh via todd) + Release 2.0.0-alpha - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/MultiFileWordCount.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/MultiFileWordCount.java index 034dce1fc44..af5e370d103 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/MultiFileWordCount.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/MultiFileWordCount.java @@ -130,8 +130,8 @@ public class MultiFileWordCount extends Configured implements Tool { public CombineFileLineRecordReader(CombineFileSplit split, TaskAttemptContext context, Integer index) throws IOException { - fs = FileSystem.get(context.getConfiguration()); this.path = split.getPath(index); + fs = this.path.getFileSystem(context.getConfiguration()); this.startOffset = split.getOffset(index); this.end = startOffset + split.getLength(index); boolean skipFirstLine = false;