HBASE-18741 Remove cancel command from backup code

Signed-off-by: tedyu <yuzhihong@gmail.com>
This commit is contained in:
Peter Somogyi 2017-09-02 12:56:05 +02:00 committed by tedyu
parent e1eb53296d
commit 7c51d3f2e1
1 changed files with 0 additions and 27 deletions

View File

@ -106,9 +106,6 @@ public final class BackupCommands {
public static final String REPAIR_CMD_USAGE = "Usage: hbase backup repair\n";
public static final String CANCEL_CMD_USAGE = "Usage: hbase backup cancel <backup_id>\n"
+ " backup_id Backup image id\n";
public static final String SET_CMD_USAGE = "Usage: hbase backup set COMMAND [name] [tables]\n"
+ " name Backup set name\n"
+ " tables Comma separated list of tables.\n" + "COMMAND is one of:\n"
@ -221,9 +218,6 @@ public final class BackupCommands {
case DELETE:
cmd = new DeleteCommand(conf, cmdline);
break;
case CANCEL:
cmd = new CancelCommand(conf, cmdline);
break;
case HISTORY:
cmd = new HistoryCommand(conf, cmdline);
break;
@ -427,8 +421,6 @@ public final class BackupCommands {
System.out.println(PROGRESS_CMD_USAGE);
} else if (BackupCommand.DELETE.name().equalsIgnoreCase(type)) {
System.out.println(DELETE_CMD_USAGE);
} else if (BackupCommand.CANCEL.name().equalsIgnoreCase(type)) {
System.out.println(CANCEL_CMD_USAGE);
} else if (BackupCommand.SET.name().equalsIgnoreCase(type)) {
System.out.println(SET_CMD_USAGE);
} else {
@ -739,25 +731,6 @@ public final class BackupCommands {
}
}
// TODO Cancel command
private static class CancelCommand extends Command {
CancelCommand(Configuration conf, CommandLine cmdline) {
super(conf);
this.cmdline = cmdline;
}
@Override
public void execute() throws IOException {
throw new UnsupportedOperationException("Cancel command is not supported yet.");
}
@Override
protected void printUsage() {
}
}
private static class HistoryCommand extends Command {
private final static int DEFAULT_HISTORY_LENGTH = 10;