protected String backupTables(BackupType type, List<TableName> tables, String path) throws IOException { Connection conn = null; BackupAdmin badmin = null; String backupId; try { conn = ConnectionFactory.createConnection(conf1); badmin = new BackupAdminImpl(conn); BackupRequest request = createBackupRequest(type, tables, path); backupId = badmin.backupTables(request); } finally { if (badmin != null) { badmin.close(); } if (conn != null) { conn.close(); } } return backupId; }