HBASE-16910 Avoid NPE when starting StochasticLoadBalancer

Signed-off-by: Ashish Singhi <ashishsinghi@apache.org>
This commit is contained in:
Guanghao Zhang 2016-10-25 11:58:41 +05:30 committed by Ashish Singhi
parent 16823ff55e
commit ae502a9d5c
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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);
} }
} }