MAPREDUCE-5824. Fixed test-failure of TestPipesNonJavaInputFormat in Windows. Contributed by Xuan Gong.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1586368 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2014-04-10 16:44:04 +00:00
parent 897fe59b1c
commit 05fd3bbe48
2 changed files with 6 additions and 1 deletions

View File

@ -183,6 +183,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

View File

@ -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);