@Override
  protected void initSource() {
    stochasticSource =
      CompatibilitySingletonFactory.getInstance(MetricsStochasticBalancerSource.class);
  }
This function overrides the initSource in the MetricsBalancer, use
MetricsStochasticBalancerSource instead of the MetricsBalancerSource.
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/MetricsStochasticBalancer.java