public void add(HDFSBlocksDistribution otherBlocksDistribution) {
    Map<String, HostAndWeight> otherHostAndWeights = otherBlocksDistribution.getHostAndWeights();
    for (Map.Entry<String, HostAndWeight> otherHostAndWeight : otherHostAndWeights.entrySet()) {
      addHostAndBlockWeight(otherHostAndWeight.getValue().host,
        otherHostAndWeight.getValue().weight, otherHostAndWeight.getValue().weightForSsd);
    }
    addUniqueWeight(otherBlocksDistribution.getUniqueBlocksTotalWeight());
  }
This will add the distribution from input to this object
@param otherBlocksDistribution the other hdfs blocks distribution
hbase-common/src/main/java/org/apache/hadoop/hbase/HDFSBlocksDistribution.java