hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject hbase git commit: HBASE-17039 SimpleLoadBalancer schedules large amount of invalid region moves
Date Wed, 09 Nov 2016 09:07:56 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 123d26ed9 -> d248d6b0b


HBASE-17039 SimpleLoadBalancer schedules large amount of invalid region moves

Signed-off-by: Yu Li <liyu@apache.org>


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

Branch: refs/heads/branch-1
Commit: d248d6b0b3d3f6f0b7a265d5f8607d5f5c62eefb
Parents: 123d26e
Author: Charlie Qiangeng Xu <charlie.xu888@yahoo.com>
Authored: Wed Nov 9 16:35:17 2016 +0800
Committer: Yu Li <liyu@apache.org>
Committed: Wed Nov 9 17:07:28 2016 +0800

----------------------------------------------------------------------
 .../hadoop/hbase/master/balancer/SimpleLoadBalancer.java       | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d248d6b0/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/SimpleLoadBalancer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/SimpleLoadBalancer.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/SimpleLoadBalancer.java
index 4325585..a354e40 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/SimpleLoadBalancer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/SimpleLoadBalancer.java
@@ -273,14 +273,10 @@ public class SimpleLoadBalancer extends BaseLoadBalancer {
         serversByLoad.entrySet()) {
       if (maxToTake == 0) break; // no more to take
       int load = server.getKey().getLoad();
-      if (load >= min && load > 0) {
+      if (load >= min) {
         continue; // look for other servers which haven't reached min
       }
       int regionsToPut = min - load;
-      if (regionsToPut == 0)
-      {
-        regionsToPut = 1;
-      }
       maxToTake -= regionsToPut;
       underloadedServers.put(server.getKey().getServerName(), regionsToPut);
     }


Mime
View raw message