@Override
  public final void updateWeight(Map<Class<? extends CandidateGenerator>, Double> weights) {
    weights.merge(RegionReplicaRackCandidateGenerator.class, cost(), Double::sum);
  }
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