From 49986e9dfe343593c35735f5e86412cb5fc842bc Mon Sep 17 00:00:00 2001 From: Peter Somogyi Date: Sat, 2 Sep 2017 12:56:05 +0200 Subject: [PATCH] HBASE-18741 Remove cancel command from backup code Signed-off-by: tedyu --- .../hbase/backup/impl/BackupCommands.java | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java index 5b91e345a9e..187a014bd14 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java @@ -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 \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;