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:08:42 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 6b8472038 -> 14db35c62


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

Branch: refs/heads/branch-1.2
Commit: 14db35c620de41e0385f3260d38b8fda0116389f
Parents: 6b84720
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:10 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/14db35c6/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 fad84f5..c4eb833 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