@Override
  public final void updateWeight(Map<Class<? extends CandidateGenerator>, Double> weights) {
    weights.merge(LocalityBasedCandidateGenerator.class, cost(), Double::sum);
  }
Maps region to the current entity (server or rack) on which it is stored
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/LocalityBasedCostFunction.java