static public HDFSBlocksDistribution computeHDFSBlocksDistribution(final FileSystem fs,
    FileStatus status, long start, long length) throws IOException {
    HDFSBlocksDistribution blocksDistribution = new HDFSBlocksDistribution();
    BlockLocation[] blockLocations = fs.getFileBlockLocations(status, start, length);
    addToHDFSBlocksDistribution(blocksDistribution, blockLocations);
    return blocksDistribution;
  }
Compute HDFS blocks distribution of a given file, or a portion of the file
@param fs     file system
@param status file status of the file
@param start  start position of the portion
@param length length of the portion
@return The HDFS blocks distribution
hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java