private void openWithoutRestoringSnapshot() throws IOException {
    Path snapshotDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(snapshotName, rootDir);
    SnapshotProtos.SnapshotDescription snapshotDesc =
      SnapshotDescriptionUtils.readSnapshotInfo(fs, snapshotDir);

    SnapshotManifest manifest = SnapshotManifest.open(conf, fs, snapshotDir, snapshotDesc);
    List<SnapshotRegionManifest> regionManifests = manifest.getRegionManifests();
    if (regionManifests == null) {
      throw new IllegalArgumentException("Snapshot seems empty, snapshotName: " + snapshotName);
    }

    regions = new ArrayList<>(regionManifests.size());
    regionManifests.stream().map(r -> ProtobufUtil.toRegionInfo(r.getRegionInfo()))
      .filter(this::isValidRegion).sorted().forEach(r -> regions.add(r));
    htd = manifest.getTableDescriptor();
  }
Creates a TableSnapshotScanner.
@param conf                    the configuration
@param rootDir                 root directory for HBase.
@param restoreDir              a temporary directory to copy the snapshot files into. Current
                               user should have write permissions to this directory, and this
                               should not be a subdirectory of rootdir. The scanner deletes the
                               contents of the directory once the scanner is closed.
@param snapshotName            the name of the snapshot to read from
@param scan                    a Scan representing scan parameters
@param snapshotAlreadyRestored true to indicate that snapshot has been restored.
@throws IOException in case of error
hbase-server/src/main/java/org/apache/hadoop/hbase/client/TableSnapshotScanner.java