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 78487200B49 for ; Wed, 3 Aug 2016 19:18:31 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 76DCC160A8C; Wed, 3 Aug 2016 17:18:31 +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 BCA36160A5D for ; Wed, 3 Aug 2016 19:18:30 +0200 (CEST) Received: (qmail 42800 invoked by uid 500); 3 Aug 2016 17:18:29 -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 42791 invoked by uid 99); 3 Aug 2016 17:18:29 -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; Wed, 03 Aug 2016 17:18:29 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C163EE3839; Wed, 3 Aug 2016 17:18:29 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kihwal@apache.org To: common-commits@hadoop.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: hadoop git commit: HDFS-742. A down DataNode makes Balancer to hang on repeatingly asking NameNode its partial block list. Contributed by Mit Desai. Date: Wed, 3 Aug 2016 17:18:29 +0000 (UTC) archived-at: Wed, 03 Aug 2016 17:18:31 -0000 Repository: hadoop Updated Branches: refs/heads/branch-2 ab7072838 -> c15959fa6 HDFS-742. A down DataNode makes Balancer to hang on repeatingly asking NameNode its partial block list. Contributed by Mit Desai. (cherry picked from commit 58db263e93daf08280e6a586a10cebd6122cf72a) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/c15959fa Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/c15959fa Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/c15959fa Branch: refs/heads/branch-2 Commit: c15959fa60160cb8da391d6839b897e4fad0e7ba Parents: ab70728 Author: Kihwal Lee Authored: Wed Aug 3 12:18:15 2016 -0500 Committer: Kihwal Lee Committed: Wed Aug 3 12:18:15 2016 -0500 ---------------------------------------------------------------------- .../hadoop/hdfs/server/balancer/Dispatcher.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/c15959fa/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java index 151ab09..8f81c19 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java @@ -788,6 +788,13 @@ public class Dispatcher { + ", scheduledSize=" + getScheduledSize() + ", srcBlocks#=" + srcBlocks.size()); } + // check if time is up or not + if (Time.monotonicNow() - startTime > MAX_ITERATION_TIME) { + LOG.info("Time up (max time=" + MAX_ITERATION_TIME/1000 + + " seconds). Skipping " + this); + isTimeUp = true; + continue; + } final PendingMove p = chooseNextMove(); if (p != null) { // Reset no pending move counter @@ -825,14 +832,6 @@ public class Dispatcher { } } - // check if time is up or not - if (Time.monotonicNow() - startTime > MAX_ITERATION_TIME) { - LOG.info("Time up (max time=" + MAX_ITERATION_TIME/1000 - + " seconds). Skipping " + this); - isTimeUp = true; - continue; - } - // Now we can not schedule any block to move and there are // no new blocks added to the source block list, so we wait. try { --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-commits-help@hadoop.apache.org