static public void addToHDFSBlocksDistribution(HDFSBlocksDistribution blocksDistribution,
    BlockLocation[] blockLocations) throws IOException {
    for (BlockLocation bl : blockLocations) {
      String[] hosts = bl.getHosts();
      long len = bl.getLength();
      StorageType[] storageTypes = bl.getStorageTypes();
      blocksDistribution.addHostsAndBlockWeight(hosts, len, storageTypes);
    }
  }
Update blocksDistribution with blockLocations
@param blocksDistribution the hdfs blocks distribution
@param blockLocations     an array containing block location
hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java