Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B0AF2200B5B for ; Fri, 5 Aug 2016 22:44:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AF74C160AB2; Fri, 5 Aug 2016 20:44:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0B91D160A64 for ; Fri, 5 Aug 2016 22:44:08 +0200 (CEST) Received: (qmail 54464 invoked by uid 500); 5 Aug 2016 20:44:03 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 53891 invoked by uid 99); 5 Aug 2016 20:44:02 -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; Fri, 05 Aug 2016 20:44:02 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 99F8FEE694; Fri, 5 Aug 2016 20:44:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: subru@apache.org To: common-commits@hadoop.apache.org Date: Fri, 05 Aug 2016 20:44:17 -0000 Message-Id: <8bdfb7d175af43a6a56296ecf35bbd4d@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [16/50] [abbrv] hadoop git commit: HDFS-10710. In BlockManager#rescanPostponedMisreplicatedBlocks(), postponed misreplicated block counts should be retrieved within the NN lock protection.Contributed by GAO Rui. archived-at: Fri, 05 Aug 2016 20:44:09 -0000 HDFS-10710. In BlockManager#rescanPostponedMisreplicatedBlocks(), postponed misreplicated block counts should be retrieved within the NN lock protection.Contributed by GAO Rui. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f4ba5ff1 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f4ba5ff1 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f4ba5ff1 Branch: refs/heads/YARN-2915 Commit: f4ba5ff1d70ef92d59851c09c4bd4b43d6c04971 Parents: db64654 Author: Jing Zhao Authored: Wed Aug 3 11:39:06 2016 -0700 Committer: Jing Zhao Committed: Wed Aug 3 12:42:05 2016 -0700 ---------------------------------------------------------------------- .../apache/hadoop/hdfs/server/blockmanagement/BlockManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/f4ba5ff1/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java index 349b018..6c25d64 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java @@ -2278,9 +2278,9 @@ public class BlockManager implements BlockStatsMXBean { return; } long startTimeRescanPostponedMisReplicatedBlocks = Time.monotonicNow(); + namesystem.writeLock(); long startPostponedMisReplicatedBlocksCount = getPostponedMisreplicatedBlocksCount(); - namesystem.writeLock(); try { // blocksPerRescan is the configured number of blocks per rescan. // Randomly select blocksPerRescan consecutive blocks from the HashSet @@ -2333,9 +2333,9 @@ public class BlockManager implements BlockStatsMXBean { } } } finally { - namesystem.writeUnlock(); long endPostponedMisReplicatedBlocksCount = getPostponedMisreplicatedBlocksCount(); + namesystem.writeUnlock(); LOG.info("Rescan of postponedMisreplicatedBlocks completed in " + (Time.monotonicNow() - startTimeRescanPostponedMisReplicatedBlocks) + " msecs. " + endPostponedMisReplicatedBlocksCount + --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-commits-help@hadoop.apache.org