private static HDFSBlocksDistribution computeRefFileHDFSBlockDistribution(final FileSystem fs,
    final Reference reference, final FileStatus status) throws IOException {
    if (status == null) {
      return null;
    }

    long start = 0;
    long length = 0;

    if (Reference.isTopFileRegion(reference.getFileRegion())) {
      start = status.getLen() / 2;
      length = status.getLen() - status.getLen() / 2;
    } else {
      start = 0;
      length = status.getLen() / 2;
    }
    return FSUtils.computeHDFSBlocksDistribution(fs, status, start, length);
  }
helper function to compute HDFS blocks distribution of a given reference file.For reference
file, we don't compute the exact value. We use some estimate instead given it might be good
enough. we assume bottom part takes the first half of reference file, top part takes the second
half of the reference file. This is just estimate, given midkey ofregion != midkey of HFile,
also the number and size of keys vary. If this estimate isn't good enough, we can improve it
later.
@param fs        The FileSystem
@param reference The reference
@param status    The reference FileStatus
@return HDFS blocks distribution
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileInfo.java