HBASE-16133 RSGroupBasedLoadBalancer.retainAssignment() might miss a region
This commit is contained in:
parent
cc73c03118
commit
bc70dc00bb
|
@ -216,9 +216,10 @@ public class RSGroupBasedLoadBalancer implements RSGroupableBalancer, LoadBalanc
|
||||||
List<ServerName> candidateList = filterOfflineServers(info, servers);
|
List<ServerName> candidateList = filterOfflineServers(info, servers);
|
||||||
ServerName server = this.internalBalancer.randomAssignment(region,
|
ServerName server = this.internalBalancer.randomAssignment(region,
|
||||||
candidateList);
|
candidateList);
|
||||||
if (server != null && !assignments.containsKey(server)) {
|
if (server != null) {
|
||||||
assignments.put(server, new ArrayList<HRegionInfo>());
|
if (!assignments.containsKey(server)) {
|
||||||
} else if (server != null) {
|
assignments.put(server, new ArrayList<HRegionInfo>());
|
||||||
|
}
|
||||||
assignments.get(server).add(region);
|
assignments.get(server).add(region);
|
||||||
} else {
|
} else {
|
||||||
//if not server is available assign to bogus so it ends up in RIT
|
//if not server is available assign to bogus so it ends up in RIT
|
||||||
|
|
Loading…
Reference in New Issue