HBASE-21055 NullPointerException when balanceOverall() but server balance info is null
Signed-off-by: huzheng <openinx@gmail.com>
This commit is contained in:
parent
e520399201
commit
92fdc8dd51
|
@ -479,6 +479,9 @@ public class SimpleLoadBalancer extends BaseLoadBalancer {
|
|||
for (int i = 0; i < serverLoadList.size(); i++) {
|
||||
ServerAndLoad serverload = serverLoadList.get(i);
|
||||
BalanceInfo balanceInfo = serverBalanceInfo.get(serverload.getServerName());
|
||||
if (balanceInfo == null) {
|
||||
continue;
|
||||
}
|
||||
setLoad(serverLoadList, i, balanceInfo.getNumRegionsAdded());
|
||||
if (balanceInfo.getHriList().size() + balanceInfo.getNumRegionsAdded() == max) {
|
||||
RegionInfo hriToPlan;
|
||||
|
|
Loading…
Reference in New Issue