@Override
  final void prepare(BalancerClusterState cluster) {
    super.prepare(cluster);
    if (!isNeeded()) {
      return;
    }
    loadCosts();
  }
A cost function for region replicas. We give a high cost for hosting replicas of the same region
in the same server, host or rack. We do not prevent the case though, since if numReplicas >
numRegionServers, we still want to keep the replica open.
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/RegionReplicaGroupingCostFunction.java