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:09:25 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.1 9fb5a8608 -> 4782767df


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

Branch: refs/heads/branch-1.1
Commit: 4782767df491a9cbe84e5105b104d4af8f2cb242
Parents: 9fb5a86
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:08:54 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/4782767d/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 9673acf..6731eed 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
@@ -271,14 +271,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