hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-13167 The check for balancerCutoffTime is buggy (Mikhail Antonov)
Date Wed, 11 Mar 2015 22:54:50 GMT
Repository: hbase
Updated Branches:
  refs/heads/master c938267db -> 9c83fa7b5


HBASE-13167 The check for balancerCutoffTime is buggy (Mikhail Antonov)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9c83fa7b
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9c83fa7b
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9c83fa7b

Branch: refs/heads/master
Commit: 9c83fa7b52188d6bdfebcba75272c5c11e8b8566
Parents: c938267
Author: stack <stack@apache.org>
Authored: Wed Mar 11 15:54:53 2015 -0700
Committer: stack <stack@apache.org>
Committed: Wed Mar 11 15:54:53 2015 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/master/HMaster.java | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/9c83fa7b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
index 5762946..5f14aa9 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
@@ -1093,15 +1093,11 @@ public class HMaster extends HRegionServer implements MasterServices,
Server {
    * @return Maximum time we should run balancer for
    */
   private int getBalancerCutoffTime() {
-    int balancerCutoffTime =
-      getConfiguration().getInt("hbase.balancer.max.balancing", -1);
+    int balancerCutoffTime = getConfiguration().getInt("hbase.balancer.max.balancing", -1);
     if (balancerCutoffTime == -1) {
-      // No time period set so create one
-      int balancerPeriod =
-        getConfiguration().getInt("hbase.balancer.period", 300000);
+      // if cutoff time isn't set, defaulting it to period time
+      int balancerPeriod = getConfiguration().getInt("hbase.balancer.period", 300000);
       balancerCutoffTime = balancerPeriod;
-      // If nonsense period, set it to balancerPeriod
-      if (balancerCutoffTime <= 0) balancerCutoffTime = balancerPeriod;
     }
     return balancerCutoffTime;
   }


Mime
View raw message