HBASE-17039 SimpleLoadBalancer schedules large amount of invalid region moves
Signed-off-by: Yu Li <liyu@apache.org>
This commit is contained in:
parent
03bc884ea0
commit
3b63f701e6
|
@ -269,14 +269,10 @@ public class SimpleLoadBalancer extends BaseLoadBalancer {
|
||||||
serversByLoad.entrySet()) {
|
serversByLoad.entrySet()) {
|
||||||
if (maxToTake == 0) break; // no more to take
|
if (maxToTake == 0) break; // no more to take
|
||||||
int load = server.getKey().getLoad();
|
int load = server.getKey().getLoad();
|
||||||
if (load >= min && load > 0) {
|
if (load >= min) {
|
||||||
continue; // look for other servers which haven't reached min
|
continue; // look for other servers which haven't reached min
|
||||||
}
|
}
|
||||||
int regionsToPut = min - load;
|
int regionsToPut = min - load;
|
||||||
if (regionsToPut == 0)
|
|
||||||
{
|
|
||||||
regionsToPut = 1;
|
|
||||||
}
|
|
||||||
maxToTake -= regionsToPut;
|
maxToTake -= regionsToPut;
|
||||||
underloadedServers.put(server.getKey().getServerName(), regionsToPut);
|
underloadedServers.put(server.getKey().getServerName(), regionsToPut);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue