HBASE-16910 Avoid NPE when starting StochasticLoadBalancer
Signed-off-by: Ashish Singhi <ashishsinghi@apache.org>
This commit is contained in:
parent
16823ff55e
commit
ae502a9d5c
|
@ -774,8 +774,8 @@ public class HMaster extends HRegionServer implements MasterServices, Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
//initialize load balancer
|
//initialize load balancer
|
||||||
this.balancer.setClusterStatus(getClusterStatus());
|
|
||||||
this.balancer.setMasterServices(this);
|
this.balancer.setMasterServices(this);
|
||||||
|
this.balancer.setClusterStatus(getClusterStatus());
|
||||||
this.balancer.initialize();
|
this.balancer.initialize();
|
||||||
|
|
||||||
// Check if master is shutting down because of some issue
|
// Check if master is shutting down because of some issue
|
||||||
|
|
|
@ -232,7 +232,7 @@ public class StochasticLoadBalancer extends BaseLoadBalancer {
|
||||||
|
|
||||||
updateMetricsSize(tablesCount * (functionsCount + 1)); // +1 for overall
|
updateMetricsSize(tablesCount * (functionsCount + 1)); // +1 for overall
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error("failed to get the size of all tables, exception = " + e.getMessage());
|
LOG.error("failed to get the size of all tables", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue