MAPREDUCE-4402. TestFileInputFormat fails intermittently (Jason Lowe via bobby)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1359252 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Joseph Evans 2012-07-09 16:14:24 +00:00
parent 80875153c3
commit 832ba3bae1
2 changed files with 8 additions and 2 deletions

View File

@ -656,6 +656,9 @@ Release 0.23.3 - UNRELEASED
space due to org.apache.hadoop.fs.LocalDirAllocator.contexts (Devaraj K space due to org.apache.hadoop.fs.LocalDirAllocator.contexts (Devaraj K
via bobby) via bobby)
MAPREDUCE-4402. TestFileInputFormat fails intermittently (Jason Lowe via
bobby)
Release 0.23.2 - UNRELEASED Release 0.23.2 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -97,13 +97,16 @@ public void testLocality() throws Exception {
private void createInputs(FileSystem fs, Path inDir, String fileName) private void createInputs(FileSystem fs, Path inDir, String fileName)
throws IOException { throws IOException {
// create a multi-block file on hdfs // create a multi-block file on hdfs
DataOutputStream out = fs.create(new Path(inDir, fileName), true, 4096, Path path = new Path(inDir, fileName);
(short) 2, 512, null); final short replication = 2;
DataOutputStream out = fs.create(path, true, 4096,
replication, 512, null);
for(int i=0; i < 1000; ++i) { for(int i=0; i < 1000; ++i) {
out.writeChars("Hello\n"); out.writeChars("Hello\n");
} }
out.close(); out.close();
System.out.println("Wrote file"); System.out.println("Wrote file");
DFSTestUtil.waitReplication(fs, path, replication);
} }
public void testNumInputs() throws Exception { public void testNumInputs() throws Exception {