Return-Path: X-Original-To: apmail-hadoop-common-commits-archive@www.apache.org Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9111F18592 for ; Sun, 6 Dec 2015 07:13:10 +0000 (UTC) Received: (qmail 7183 invoked by uid 500); 6 Dec 2015 07:13:05 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 6609 invoked by uid 500); 6 Dec 2015 07:13:05 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 4658 invoked by uid 99); 6 Dec 2015 07:13:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Dec 2015 07:13:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 420CEDFF4F; Sun, 6 Dec 2015 07:13:04 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: asuresh@apache.org To: common-commits@hadoop.apache.org Date: Sun, 06 Dec 2015 07:13:27 -0000 Message-Id: In-Reply-To: <5403537e05c0447f827148a3c20cca60@git.apache.org> References: <5403537e05c0447f827148a3c20cca60@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [25/38] hadoop git commit: HDFS-9484. NNThroughputBenchmark$BlockReportStats should not send empty block reports. Contributed by Mingliang Liu. HDFS-9484. NNThroughputBenchmark$BlockReportStats should not send empty block reports. Contributed by Mingliang Liu. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/924a33d0 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/924a33d0 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/924a33d0 Branch: refs/heads/yarn-2877 Commit: 924a33d02d82adef11a56bf97ff4100c567d9e5d Parents: e71aa71 Author: Konstantin V Shvachko Authored: Thu Dec 3 14:51:06 2015 -0800 Committer: Konstantin V Shvachko Committed: Thu Dec 3 15:03:34 2015 -0800 ---------------------------------------------------------------------- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../hadoop/hdfs/server/namenode/NNThroughputBenchmark.java | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/924a33d0/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index ef2efc7..40fdc58 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -2436,6 +2436,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 http://git-wip-us.apache.org/repos/asf/hadoop/blob/924a33d0/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java ---------------------------------------------------------------------- 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 91f9793..8a594ed 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() {