hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chia7...@apache.org
Subject hbase git commit: HBASE-18765 The value of balancerRan is true even though no plans are executed
Date Fri, 08 Sep 2017 05:58:08 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 baecf33ea -> 7b2ce38b4


HBASE-18765 The value of balancerRan is true even though no plans are executed


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

Branch: refs/heads/branch-2
Commit: 7b2ce38b4bb714be508b39bc9f1f7354a1691884
Parents: baecf33
Author: Chia-Ping Tsai <chia7712@gmail.com>
Authored: Thu Sep 7 02:11:49 2017 +0800
Committer: Chia-Ping Tsai <chia7712@gmail.com>
Committed: Fri Sep 8 13:57:48 2017 +0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java   | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/7b2ce38b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java
----------------------------------------------------------------------
diff --git a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java
b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java
index 11c2403..e3f5be5 100644
--- a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java
+++ b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java
@@ -492,7 +492,6 @@ public class RSGroupAdminServer implements RSGroupAdmin {
     AssignmentManager assignmentManager = master.getAssignmentManager();
     LoadBalancer balancer = master.getLoadBalancer();
 
-    boolean balancerRan;
     synchronized (balancer) {
       // If balance not true, don't run balancer.
       if (!((HMaster) master).isBalancerOn()) return false;
@@ -530,8 +529,8 @@ public class RSGroupAdminServer implements RSGroupAdmin {
         }
       }
       long startTime = System.currentTimeMillis();
-      balancerRan = plans != null;
-      if (plans != null && !plans.isEmpty()) {
+      boolean balancerRan = !plans.isEmpty();
+      if (balancerRan) {
         LOG.info("RSGroup balance " + groupName + " starting with plan count: " + plans.size());
         for (RegionPlan plan: plans) {
           LOG.info("balance " + plan);
@@ -543,8 +542,8 @@ public class RSGroupAdminServer implements RSGroupAdmin {
       if (master.getMasterCoprocessorHost() != null) {
         master.getMasterCoprocessorHost().postBalanceRSGroup(groupName, balancerRan);
       }
+      return balancerRan;
     }
-    return balancerRan;
   }
 
   @Override


Mime
View raw message