private void restore(BackupManifest manifest, TableName[] sTableArray, TableName[] tTableArray,
    boolean isOverwrite, boolean isKeepOriginalSplits) throws IOException {
    TreeSet<BackupImage> restoreImageSet = new TreeSet<>();

    for (int i = 0; i < sTableArray.length; i++) {
      TableName table = sTableArray[i];

      // Get the image list of this backup for restore in time order from old
      // to new.
      List<BackupImage> list = new ArrayList<>();
      list.add(manifest.getBackupImage());
      TreeSet<BackupImage> set = new TreeSet<>(list);
      List<BackupImage> depList = manifest.getDependentListByTable(table);
      set.addAll(depList);
      BackupImage[] arr = new BackupImage[set.size()];
      set.toArray(arr);
      restoreImages(arr, table, tTableArray[i], isOverwrite, isKeepOriginalSplits);
      restoreImageSet.addAll(list);
      if (restoreImageSet != null && !restoreImageSet.isEmpty()) {
        LOG.info("Restore includes the following image(s):");
        for (BackupImage image : restoreImageSet) {
          LOG.info("Backup: " + image.getBackupId() + " "
            + HBackupFileSystem.getTableBackupDir(image.getRootDir(), image.getBackupId(), table));
        }
      }
    }
    LOG.debug("restoreStage finished");
  }
Restore operation. Stage 2: resolved Backup Image dependency
@param sTableArray The array of tables to be restored
@param tTableArray The array of mapping tables to restore to
@throws IOException exception
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/RestoreTablesClient.java