Browse Source

MAPREDUCE-5824. Fixed test-failure of TestPipesNonJavaInputFormat in Windows. Contributed by Xuan Gong.
svn merge --ignore-ancestry -c 1586368 ../../trunk/


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1586369 13f79535-47bb-0310-9956-ffa450edef68

Vinod Kumar Vavilapalli 11 năm trước cách đây
mục cha
commit
ec907fef0e

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

@@ -47,6 +47,9 @@ Release 2.4.1 - UNRELEASED
 
     MAPREDUCE-5818. Added "hsadmin" command into mapred.cmd. (Jian He via zjshen)
 
+    MAPREDUCE-5824. Fixed test-failure of TestPipesNonJavaInputFormat in
+    Windows. (Xuan Gong via vinodkv)
+
 Release 2.4.0 - 2014-04-07 
 
   INCOMPATIBLE CHANGES

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

@@ -28,6 +28,7 @@ import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.RecordReader;
 import org.apache.hadoop.mapred.Reporter;
 import org.apache.hadoop.mapred.pipes.TestPipeApplication.FakeSplit;
+import org.apache.hadoop.util.StringUtils;
 import org.junit.Assert;
 import org.junit.Test;
 import static org.junit.Assert.*;
@@ -69,7 +70,8 @@ public class TestPipesNonJavaInputFormat {
     }
     // set data for splits
     conf.set(org.apache.hadoop.mapreduce.lib.input.FileInputFormat.INPUT_DIR,
-        input1.getAbsolutePath() + "," + input2.getAbsolutePath());
+        StringUtils.escapeString(input1.getAbsolutePath()) + ","
+            + StringUtils.escapeString(input2.getAbsolutePath()));
     InputSplit[] splits = inputFormat.getSplits(conf, 2);
     assertEquals(2, splits.length);