hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-15764 Builtin help for 'hbase backup' doesn't recognize the subcommand
Date Wed, 04 May 2016 02:22:29 GMT
Repository: hbase
Updated Branches:
  refs/heads/HBASE-7912 53a2a55ae -> 5db8995f4


HBASE-15764 Builtin help for 'hbase backup' doesn't recognize the subcommand


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/5db8995f
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/5db8995f
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/5db8995f

Branch: refs/heads/HBASE-7912
Commit: 5db8995f4f64b96676efc349e3bc45f420f64b3b
Parents: 53a2a55
Author: tedyu <yuzhihong@gmail.com>
Authored: Tue May 3 19:22:02 2016 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Tue May 3 19:22:02 2016 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/backup/impl/BackupCommands.java   | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/5db8995f/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java
index bd03605..35ac257 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java
@@ -231,13 +231,13 @@ public final class BackupCommands {
         System.exit(0);
       }
 
-      if (args.length != 1) {
+      if (args.length != 2) {
         System.out.println("Only support check help message of a single command type");
         System.out.println(USAGE);
         System.exit(0);
       }
 
-      String type = args[0];
+      String type = args[1];
 
       if (BackupCommand.CREATE.name().equalsIgnoreCase(type)) {
         System.out.println(CREATE_CMD_USAGE);
@@ -249,11 +249,9 @@ public final class BackupCommands {
         System.out.println(PROGRESS_CMD_USAGE);
       } else if (BackupCommand.DELETE.name().equalsIgnoreCase(type)) {
         System.out.println(DELETE_CMD_USAGE);
-      }
-      if (BackupCommand.CANCEL.name().equalsIgnoreCase(type)) {
+      } else if (BackupCommand.CANCEL.name().equalsIgnoreCase(type)) {
         System.out.println(CANCEL_CMD_USAGE);
-      }
-      if (BackupCommand.SET.name().equalsIgnoreCase(type)) {
+      } else if (BackupCommand.SET.name().equalsIgnoreCase(type)) {
         System.out.println(SET_CMD_USAGE);
       } else {
         System.out.println("Unknown command : " + type);


Mime
View raw message