private static Pair<SnapshotFileInfo, Long> getSnapshotFileAndSize(FileSystem fs,
    Configuration conf, TableName table, String region, String family, String hfile, long size)
    throws IOException {
    Path path = HFileLink.createPath(table, region, family, hfile);
    SnapshotFileInfo fileInfo = SnapshotFileInfo.newBuilder().setType(SnapshotFileInfo.Type.HFILE)
      .setHfile(path.toString()).build();
    if (size == -1) {
      size = HFileLink.buildFromHFileLinkPattern(conf, path).getFileStatus(fs).getLen();
    }
    return new Pair<>(fileInfo, size);
  }
Extract the list of files (HFiles/WALs) to copy using Map-Reduce.
@return list of files referenced by the snapshot (pair of path and size)
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java