diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 8f70927f8c0..f94d5b9b1cd 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -656,6 +656,9 @@ Release 0.23.3 - UNRELEASED space due to org.apache.hadoop.fs.LocalDirAllocator.contexts (Devaraj K via bobby) + MAPREDUCE-4402. TestFileInputFormat fails intermittently (Jason Lowe via + bobby) + Release 0.23.2 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestFileInputFormat.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestFileInputFormat.java index fca9b358647..3c59943159a 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestFileInputFormat.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestFileInputFormat.java @@ -97,13 +97,16 @@ public class TestFileInputFormat extends TestCase { private void createInputs(FileSystem fs, Path inDir, String fileName) throws IOException { // create a multi-block file on hdfs - DataOutputStream out = fs.create(new Path(inDir, fileName), true, 4096, - (short) 2, 512, null); + Path path = new Path(inDir, fileName); + final short replication = 2; + DataOutputStream out = fs.create(path, true, 4096, + replication, 512, null); for(int i=0; i < 1000; ++i) { out.writeChars("Hello\n"); } out.close(); System.out.println("Wrote file"); + DFSTestUtil.waitReplication(fs, path, replication); } public void testNumInputs() throws Exception {