FileInfo addStoreFile(final RegionInfo region, final String family,
      final SnapshotRegionManifest.StoreFile storeFile, final Map<Path, Integer> filesMap)
      throws IOException {
      HFileLink link =
        HFileLink.build(conf, snapshotTable, region.getEncodedName(), family, storeFile.getName());
      boolean isCorrupted = false;
      boolean inArchive = false;
      long size = -1;
      try {
        if (fs.exists(link.getArchivePath())) {
          inArchive = true;
          size = fs.getFileStatus(link.getArchivePath()).getLen();
          hfilesArchiveSize.addAndGet(size);
          hfilesArchiveCount.incrementAndGet();

          // If store file is not shared with other snapshots and tables,
          // increase nonSharedHfilesArchiveSize
          if (
            (filesMap != null) && !isArchivedFileStillReferenced(link.getArchivePath(), filesMap)
          ) {
            nonSharedHfilesArchiveSize.addAndGet(size);
          }
        } else if (fs.exists(link.getMobPath())) {
          inArchive = true;
          size = fs.getFileStatus(link.getMobPath()).getLen();
          hfilesMobSize.addAndGet(size);
          hfilesMobCount.incrementAndGet();
        } else {
          size = link.getFileStatus(fs).getLen();
          hfilesSize.addAndGet(size);
          hfilesCount.incrementAndGet();
        }
        isCorrupted = (storeFile.hasFileSize() && storeFile.getFileSize() != size);
        if (isCorrupted) hfilesCorrupted.incrementAndGet();
      } catch (FileNotFoundException e) {
        hfilesMissing.incrementAndGet();
      }
      return new FileInfo(inArchive, size, isCorrupted);
    }
Add the specified store file to the stats
@param region    region encoded Name
@param family    family name
@param storeFile store file name
@param filesMap  store files map for all snapshots, it may be null
@return the store file information
hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java