public long getWeight(String host) {
    long weight = 0;
    if (host != null) {
      HostAndWeight hostAndWeight = this.hostAndWeights.get(host);
      if (hostAndWeight != null) {
        weight = hostAndWeight.getWeight();
      }
    }
    return weight;
  }
return the weight for a specific host, that will be the total bytes of all blocks on the host
@param host the host name
@return the weight of the given host
hbase-common/src/main/java/org/apache/hadoop/hbase/HDFSBlocksDistribution.java