diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 2bb9a73d46..3ad70a876b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -162,6 +162,8 @@ Release 0.23.1 - UNRELEASED HDFS-2567. When 0 DNs are available, show a proper error when 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 diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java index c7566d2c62..409dd37525 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java @@ -84,6 +84,7 @@ public class DFSTestUtil { private int maxLevels;// = 3; private int maxSize;// = 8*1024; + private int minSize = 1; private int nFiles; private MyFile[] files; @@ -139,7 +140,7 @@ private class MyFile { long fidx = -1; while (fidx < 0) { fidx = gen.nextLong(); } name = name + Long.toString(fidx); - size = gen.nextInt(maxSize); + size = minSize + gen.nextInt(maxSize - minSize); seed = gen.nextLong(); }