private boolean areSomeRegionReplicasColocatedOnRack(BalancerClusterState c) {
    if (!c.hasRegionReplicas || balancerConditionals.isReplicaDistributionEnabled()) {
      // This check is unnecessary without replicas, or with conditional replica distribution
      // The balancer will auto-run if conditional replica distribution candidates are available
      return false;
    }
    if (c.numRacks >= c.maxReplicas) {
      regionReplicaRackCostFunction.prepare(c);
      double rackCost = Math.abs(regionReplicaRackCostFunction.cost());
      boolean colocatedAtRack = rackCost > CostFunction.getCostEpsilon(rackCost);
      if (colocatedAtRack) {
        return true;
      }
      LOG.trace("No rack colocation detected with rack cost={}", rackCost);
    } else {
      LOG.trace("Rack colocation is inevitable with fewer racks than replicas, "
        + "so we won't bother checking");
    }
    return false;
  }
Update the number of metrics that are reported to JMX
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java