public static SnapshotStats getSnapshotStats(final Configuration conf,
    final SnapshotProtos.SnapshotDescription snapshotDesc, final Map<Path, Integer> filesMap)
    throws IOException {
    Path rootDir = CommonFSUtils.getRootDir(conf);
    FileSystem fs = FileSystem.get(rootDir.toUri(), conf);
    Path snapshotDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(snapshotDesc, rootDir);
    SnapshotManifest manifest = SnapshotManifest.open(conf, fs, snapshotDir, snapshotDesc);
    final SnapshotStats stats = new SnapshotStats(conf, fs, snapshotDesc);
    SnapshotReferenceUtil.concurrentVisitReferencedFiles(conf, fs, manifest,
      "SnapshotsStatsAggregation", new SnapshotReferenceUtil.SnapshotVisitor() {
        @Override
        public void storeFile(final RegionInfo regionInfo, final String family,
          final SnapshotRegionManifest.StoreFile storeFile) throws IOException {
          if (!storeFile.hasReference()) {
            stats.addStoreFile(regionInfo, family, storeFile, filesMap);
          }
        }
      });
    return stats;
  }
Returns the snapshot stats
@param conf         the {@link Configuration} to use
@param snapshotDesc HBaseProtos.SnapshotDescription to get stats from
@param filesMap     {@link Map} store files map for all snapshots, it may be null
@return the snapshot stats
hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java