Browse Source

MAPREDUCE-6396. TestPipeApplication fails by NullPointerException. Contributed by Brahma Reddy Battula.

Akira Ajisaka 10 years ago
parent
commit
85cc644f92

+ 3 - 0
hadoop-mapreduce-project/CHANGES.txt

@@ -197,6 +197,9 @@ Trunk (Unreleased)
     MAPREDUCE-6343. JobConf.parseMaximumHeapSizeMB() fails to parse value 
     greater than 2GB expressed in bytes. (Hao Xia via kasha)
 
+    MAPREDUCE-6396. TestPipeApplication fails by NullPointerException.
+    (Brahma Reddy Battula via aajisaka)
+
   BREAKDOWN OF MAPREDUCE-2841 (NATIVE TASK) SUBTASKS
 
     MAPREDUCE-5985. native-task: Fix build on macosx. Contributed by

+ 3 - 2
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/pipes/TestPipeApplication.java

@@ -36,6 +36,7 @@ import java.util.Map.Entry;
 
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.FileUtil;
+import org.apache.hadoop.fs.FsConstants;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.RawLocalFileSystem;
 import org.apache.hadoop.io.BooleanWritable;
@@ -94,7 +95,7 @@ public class TestPipeApplication {
       CombineOutputCollector<IntWritable, Text> output = new CombineOutputCollector<IntWritable, Text>(
               new Counters.Counter(), new Progress());
       FileSystem fs = new RawLocalFileSystem();
-      fs.setConf(conf);
+      fs.initialize(FsConstants.LOCAL_FS_URI, conf);
       Writer<IntWritable, Text> wr = new Writer<IntWritable, Text>(conf, fs.create(
               new Path(workSpace + File.separator + "outfile")), IntWritable.class,
               Text.class, null, null, true);
@@ -176,7 +177,7 @@ public class TestPipeApplication {
       FakeCollector output = new FakeCollector(new Counters.Counter(),
               new Progress());
       FileSystem fs = new RawLocalFileSystem();
-      fs.setConf(conf);
+      fs.initialize(FsConstants.LOCAL_FS_URI, conf);
       Writer<IntWritable, Text> wr = new Writer<IntWritable, Text>(conf, fs.create(
               new Path(workSpace.getAbsolutePath() + File.separator + "outfile")),
               IntWritable.class, Text.class, null, null, true);