diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 3b3d074801e..c43b2c45adf 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1571,6 +1571,9 @@ Release 2.8.0 - UNRELEASED HDFS-9429. Tests in TestDFSAdminWithHA intermittently fail with EOFException (Xiao Chen via Colin P. McCabe) + HDFS-9484. NNThroughputBenchmark$BlockReportStats should not send empty + block reports. (Mingliang Liu via shv) + Release 2.7.3 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java index 91f97935669..8a594ede4a0 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java @@ -925,7 +925,7 @@ public class NNThroughputBenchmark implements Tool { NamespaceInfo nsInfo; DatanodeRegistration dnRegistration; DatanodeStorage storage; //only one storage - final ArrayList blocks; + final List blocks; int nrBlocks; // actual number of blocks BlockListAsLongs blockReportList; final int dnIdx; @@ -938,7 +938,7 @@ public class NNThroughputBenchmark implements Tool { TinyDatanode(int dnIdx, int blockCapacity) throws IOException { this.dnIdx = dnIdx; - this.blocks = new ArrayList(blockCapacity); + this.blocks = Arrays.asList(new BlockReportReplica[blockCapacity]); this.nrBlocks = 0; } @@ -1013,7 +1013,7 @@ public class NNThroughputBenchmark implements Tool { Block block = new Block(blocks.size() - idx, 0, 0); blocks.set(idx, new BlockReportReplica(block)); } - blockReportList = BlockListAsLongs.EMPTY; + blockReportList = BlockListAsLongs.encode(blocks); } BlockListAsLongs getBlockReportList() {