From d248d6b0b3d3f6f0b7a265d5f8607d5f5c62eefb Mon Sep 17 00:00:00 2001 From: Charlie Qiangeng Xu Date: Wed, 9 Nov 2016 16:35:17 +0800 Subject: [PATCH] HBASE-17039 SimpleLoadBalancer schedules large amount of invalid region moves Signed-off-by: Yu Li --- .../hadoop/hbase/master/balancer/SimpleLoadBalancer.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 43255859439..a354e40eeaa 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); }