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 80DFF200B43 for ; Tue, 19 Jul 2016 23:41:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7FF28160A8E; Tue, 19 Jul 2016 21:41:11 +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 AF15B160A8B for ; Tue, 19 Jul 2016 23:41:10 +0200 (CEST) Received: (qmail 18191 invoked by uid 500); 19 Jul 2016 21:41:02 -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 17494 invoked by uid 99); 19 Jul 2016 21:41: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; Tue, 19 Jul 2016 21:41:02 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1FE0ADFBEE; Tue, 19 Jul 2016 21:41: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: Tue, 19 Jul 2016 21:41:27 -0000 Message-Id: <3b82530d125c4d07b28949591c9b40d3@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [27/50] hadoop git commit: HDFS-10600. PlanCommand#getThrsholdPercentage should not use throughput value. (Yiqun Lin via lei) archived-at: Tue, 19 Jul 2016 21:41:11 -0000 HDFS-10600. PlanCommand#getThrsholdPercentage should not use throughput value. (Yiqun Lin via lei) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/678d0d4f Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/678d0d4f Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/678d0d4f Branch: refs/heads/YARN-2915 Commit: 678d0d4f56d1c5f0eb490000cb474799429c3cc8 Parents: 7bd489c Author: Lei Xu Authored: Thu Jul 14 10:40:34 2016 -0700 Committer: Subru Krishnan Committed: Tue Jul 19 14:39:31 2016 -0700 ---------------------------------------------------------------------- .../main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java | 8 ++++++-- .../apache/hadoop/hdfs/server/datanode/DiskBalancer.java | 10 +++++----- .../hdfs/server/diskbalancer/command/PlanCommand.java | 4 ++-- .../hadoop-hdfs/src/main/resources/hdfs-default.xml | 9 +++++++++ 4 files changed, 22 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/678d0d4f/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java index e734055..40711a7 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java @@ -947,9 +947,9 @@ public class DFSConfigKeys extends CommonConfigurationKeys { "dfs.disk.balancer.enabled"; public static final boolean DFS_DISK_BALANCER_ENABLED_DEFAULT = false; - public static final String DFS_DISK_BALANCER_MAX_DISK_THRUPUT = + public static final String DFS_DISK_BALANCER_MAX_DISK_THROUGHPUT = "dfs.disk.balancer.max.disk.throughputInMBperSec"; - public static final int DFS_DISK_BALANCER_MAX_DISK_THRUPUT_DEFAULT = + public static final int DFS_DISK_BALANCER_MAX_DISK_THROUGHPUT_DEFAULT = 10; public static final String DFS_DISK_BALANCER_MAX_DISK_ERRORS = @@ -961,6 +961,10 @@ public class DFSConfigKeys extends CommonConfigurationKeys { "dfs.disk.balancer.block.tolerance.percent"; public static final int DFS_DISK_BALANCER_BLOCK_TOLERANCE_DEFAULT = 5; + public static final String DFS_DISK_BALANCER_PLAN_THRESHOLD = + "dfs.disk.balancer.plan.threshold.percent"; + public static final int DFS_DISK_BALANCER_PLAN_THRESHOLD_DEFAULT = 10; + // dfs.client.retry confs are moved to HdfsClientConfigKeys.Retry @Deprecated http://git-wip-us.apache.org/repos/asf/hadoop/blob/678d0d4f/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java index 5a1fb9e..c6948f88 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java @@ -109,8 +109,8 @@ public class DiskBalancer { DFSConfigKeys.DFS_DISK_BALANCER_ENABLED, DFSConfigKeys.DFS_DISK_BALANCER_ENABLED_DEFAULT); this.bandwidth = conf.getInt( - DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THRUPUT, - DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THRUPUT_DEFAULT); + DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THROUGHPUT, + DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THROUGHPUT_DEFAULT); } /** @@ -656,8 +656,8 @@ public class DiskBalancer { shouldRun = new AtomicBoolean(false); this.diskBandwidth = conf.getLong( - DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THRUPUT, - DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THRUPUT_DEFAULT); + DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THROUGHPUT, + DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THROUGHPUT_DEFAULT); this.blockTolerance = conf.getLong( DFSConfigKeys.DFS_DISK_BALANCER_BLOCK_TOLERANCE, @@ -673,7 +673,7 @@ public class DiskBalancer { LOG.debug("Found 0 or less as max disk throughput, ignoring config " + "value. value : " + diskBandwidth); diskBandwidth = - DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THRUPUT_DEFAULT; + DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THROUGHPUT_DEFAULT; } if (this.blockTolerance <= 0) { http://git-wip-us.apache.org/repos/asf/hadoop/blob/678d0d4f/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/PlanCommand.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/PlanCommand.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/PlanCommand.java index 54a63ec..3159312 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/PlanCommand.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/PlanCommand.java @@ -214,8 +214,8 @@ public class PlanCommand extends Command { if ((value <= 0.0) || (value > 100.0)) { value = getConf().getDouble( - DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THRUPUT, - DFSConfigKeys.DFS_DISK_BALANCER_MAX_DISK_THRUPUT_DEFAULT); + DFSConfigKeys.DFS_DISK_BALANCER_PLAN_THRESHOLD, + DFSConfigKeys.DFS_DISK_BALANCER_PLAN_THRESHOLD_DEFAULT); } return value; } http://git-wip-us.apache.org/repos/asf/hadoop/blob/678d0d4f/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml b/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml index c8dc66b..698a0cc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml @@ -4158,4 +4158,13 @@ balancer is disabled. + + + dfs.disk.balancer.plan.threshold.percent + 10 + + The percentage that disk tolerance that we are ok with in + a plan. + + --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-commits-help@hadoop.apache.org