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:42 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 5847c901a -> e69b05d10


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/e69b05d1
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e69b05d1
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e69b05d1

Branch: refs/heads/master
Commit: e69b05d109d4afa4bc6201197407e3f40044c522
Parents: 5847c90
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:19 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/e69b05d1/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