private void addHostAndBlockWeight(String host, long weight, long weightForSsd) {
    if (host == null) {
      // erroneous data
      return;
    }

    HostAndWeight hostAndWeight = this.hostAndWeights.get(host);
    if (hostAndWeight == null) {
      hostAndWeight = new HostAndWeight(host, weight, weightForSsd);
      this.hostAndWeights.put(host, hostAndWeight);
    } else {
      hostAndWeight.addWeight(weight, weightForSsd);
    }
  }
add some weight to a specific host
@param host         the host name
@param weight       the weight
@param weightForSsd the weight for ssd
hbase-common/src/main/java/org/apache/hadoop/hbase/HDFSBlocksDistribution.java