@Test
  public void testFullRestoreRemoteWithAlternateRestoreOutputDir() throws Exception {
    LOG.info("test remote full backup on a single table with alternate restore output dir");
    String backupId =
      backupTables(BackupType.FULL, toList(table1.getNameAsString()), BACKUP_REMOTE_ROOT_DIR);
    LOG.info("backup complete");
    TableName[] tableset = new TableName[] { table1 };
    TableName[] tablemap = new TableName[] { table1_restore };

    HBaseTestingUtil mrTestUtil = new HBaseTestingUtil();
    mrTestUtil.setZkCluster(TEST_UTIL.getZkCluster());
    mrTestUtil.startMiniDFSCluster(3);
    mrTestUtil.startMiniMapReduceCluster();

    Configuration testUtilConf = TEST_UTIL.getConnection().getConfiguration();
    Configuration conf = new Configuration(mrTestUtil.getConfiguration());
    conf.set(HConstants.ZOOKEEPER_ZNODE_PARENT,
      testUtilConf.get(HConstants.ZOOKEEPER_ZNODE_PARENT));
    conf.set(HConstants.MASTER_ADDRS_KEY, testUtilConf.get(HConstants.MASTER_ADDRS_KEY));

    new BackupAdminImpl(ConnectionFactory.createConnection(conf))
      .restore(new RestoreRequest.Builder().withBackupRootDir(BACKUP_REMOTE_ROOT_DIR)
        .withRestoreRootDir(BACKUP_ROOT_DIR).withBackupId(backupId).withCheck(false)
        .withFromTables(tableset).withToTables(tablemap).withOvewrite(false).build());

    Path hfileOutputPath = new Path(
      new Path(conf.get(MapReduceHFileSplitterJob.BULK_OUTPUT_CONF_KEY)).toUri().getPath());

    // files exist on hbase cluster
    FileSystem fileSystem = FileSystem.get(TEST_UTIL.getConfiguration());
    assertTrue(fileSystem.exists(hfileOutputPath));

    // files don't exist on MR cluster
    fileSystem = FileSystem.get(conf);
    assertFalse(fileSystem.exists(hfileOutputPath));

    Admin hba = TEST_UTIL.getAdmin();
    assertTrue(hba.tableExists(table1_restore));
    TEST_UTIL.deleteTable(table1_restore);
    hba.close();
  }
Verify that restore jobs can be run on a standalone mapreduce cluster. Ensures hfiles output
via {@link MapReduceHFileSplitterJob} exist on correct filesystem.
@throws Exception if doing the backup or an operation on the tables fails
hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestRemoteRestore.java