HBASE-21055 NullPointerException when balanceOverall() but server balance info is null
Signed-off-by: huzheng <openinx@gmail.com>
This commit is contained in:
parent
b972b9a2d9
commit
34a88fca76
|
@ -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