HDFS-2575. DFSTestUtil may create empty files. Contributed by Todd Lipcon.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1204652 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
63edb9d724
commit
68173af69d
|
@ -163,6 +163,8 @@ Release 0.23.1 - UNRELEASED
|
||||||
HDFS-2567. When 0 DNs are available, show a proper error when
|
HDFS-2567. When 0 DNs are available, show a proper error when
|
||||||
trying to browse DFS via web UI. (harsh via eli)
|
trying to browse DFS via web UI. (harsh via eli)
|
||||||
|
|
||||||
|
HDFS-2575. DFSTestUtil may create empty files (todd)
|
||||||
|
|
||||||
Release 0.23.0 - 2011-11-01
|
Release 0.23.0 - 2011-11-01
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -84,6 +84,7 @@ public class DFSTestUtil {
|
||||||
|
|
||||||
private int maxLevels;// = 3;
|
private int maxLevels;// = 3;
|
||||||
private int maxSize;// = 8*1024;
|
private int maxSize;// = 8*1024;
|
||||||
|
private int minSize = 1;
|
||||||
private int nFiles;
|
private int nFiles;
|
||||||
private MyFile[] files;
|
private MyFile[] files;
|
||||||
|
|
||||||
|
@ -139,7 +140,7 @@ public class DFSTestUtil {
|
||||||
long fidx = -1;
|
long fidx = -1;
|
||||||
while (fidx < 0) { fidx = gen.nextLong(); }
|
while (fidx < 0) { fidx = gen.nextLong(); }
|
||||||
name = name + Long.toString(fidx);
|
name = name + Long.toString(fidx);
|
||||||
size = gen.nextInt(maxSize);
|
size = minSize + gen.nextInt(maxSize - minSize);
|
||||||
seed = gen.nextLong();
|
seed = gen.nextLong();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue