From ec907fef0ed47acd7531bd03caf855e7b7e9f404 Mon Sep 17 00:00:00 2001 From: Vinod Kumar Vavilapalli Date: Thu, 10 Apr 2014 16:44:31 +0000 Subject: [PATCH] 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 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../hadoop/mapred/pipes/TestPipesNonJavaInputFormat.java | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index f74528a3466..e601da9d7b3 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/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 diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/pipes/TestPipesNonJavaInputFormat.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/pipes/TestPipesNonJavaInputFormat.java index b3277854d18..ce1f4f57904 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/pipes/TestPipesNonJavaInputFormat.java +++ b/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);