private void computeBlockDistribution() throws IOException {
    lastCachedAt = EnvironmentEdgeManager.currentTime();

    FSDataInputStream stream;
    if (fileInfo.isLink()) {
      stream = FileLink.getUnderlyingFileLinkInputStream(this.stream);
    } else {
      stream = this.stream;
    }

    if (!(stream instanceof HdfsDataInputStream)) {
      if (!streamUnsupported) {
        LOG.warn(
          "{} for storeFileInfo={}, isLink={}, is not an HdfsDataInputStream so cannot be "
            + "used to derive locality. Falling back on cached value.",
          stream, fileInfo, fileInfo.isLink());
        streamUnsupported = true;
      }
      return;
    }

    streamUnsupported = false;
    hdfsBlocksDistribution = FSUtils.computeHDFSBlocksDistribution((HdfsDataInputStream) stream);
  }
Get the HDFSBlocksDistribution derived from the StoreFile input stream, re-computing if cache
is expired.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/InputStreamBlockDistribution.java