wchevreuil commented on a change in pull request #3: Hbase 22567
URL: https://github.com/apache/hbase-operator-tools/pull/3#discussion_r300469233
 
 

 ##########
 File path: hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java
 ##########
 @@ -440,51 +620,64 @@ public int run(String[] args) throws IOException {
     String[] commands = commandLine.getArgs();
     String command = commands[0];
     switch (command) {
-      case SET_TABLE_STATE:
-        if (commands.length < 3) {
-          usage(options, command + " takes tablename and state arguments: e.g. 
user ENABLED");
-          return EXIT_FAILURE;
-        }
-        System.out.println(setTableState(TableName.valueOf(commands[1]),
-            TableState.State.valueOf(commands[2])));
-        break;
-
-      case ASSIGNS:
-        if (commands.length < 2) {
-          usage(options, command + " takes one or more encoded region names");
-          return EXIT_FAILURE;
-        }
-        System.out.println(assigns(purgeFirst(commands)));
-        break;
+    case SET_TABLE_STATE:
+      if (commands.length < 3) {
+        usage(options, command + " takes tablename and state arguments: e.g. 
user ENABLED");
+        return EXIT_FAILURE;
+      }
+      System.out.println(setTableState(TableName.valueOf(commands[1]), 
TableState.State.valueOf(commands[2])));
+      break;
 
-      case BYPASS:
-        if (commands.length < 2) {
-          usage(options, command + " takes one or more pids");
-          return EXIT_FAILURE;
-        }
-        List<Boolean> bs = bypass(purgeFirst(commands));
-        if (bs == null) {
-          // Something went wrong w/ the parse and command didn't run.
-          return EXIT_FAILURE;
-        }
-        System.out.println(toString(bs));
-        break;
+    case ASSIGNS:
+      if (commands.length < 2) {
+        usage(options, command + " takes one or more encoded region names");
+        return EXIT_FAILURE;
+      }
+      System.out.println(assigns(purgeFirst(commands)));
+      break;
 
-      case UNASSIGNS:
-        if (commands.length < 2) {
-          usage(options, command + " takes one or more encoded region names");
-          return EXIT_FAILURE;
-        }
-        System.out.println(toString(unassigns(purgeFirst(commands))));
-        break;
-
-      case SET_REGION_STATE:
-        if(commands.length < 3){
-          usage(options, command + " takes region encoded name and state 
arguments: e.g. "
-            + "35f30b0ce922c34bf5c284eff33ba8b3 CLOSING");
-          return EXIT_FAILURE;
-        }
-        return setRegionState(commands[1], 
RegionState.State.valueOf(commands[2]));
+    case BYPASS:
+      if (commands.length < 2) {
+        usage(options, command + " takes one or more pids");
+        return EXIT_FAILURE;
+      }
+      List<Boolean> bs = bypass(purgeFirst(commands));
+      if (bs == null) {
+        // Something went wrong w/ the parse and command didn't run.
+        return EXIT_FAILURE;
+      }
+      System.out.println(toString(bs));
+      break;
+
+    case UNASSIGNS:
+      if (commands.length < 2) {
+        usage(options, command + " takes one or more encoded region names");
+        return EXIT_FAILURE;
+      }
+      System.out.println(toString(unassigns(purgeFirst(commands))));
+      break;
+
+    case SET_REGION_STATE:
+      if (commands.length < 3) {
+        usage(options, command + " takes region encoded name and state 
arguments: e.g. "
+          + "35f30b0ce922c34bf5c284eff33ba8b3 CLOSING");
+        return EXIT_FAILURE;
+      }
+      return setRegionState(commands[1], 
RegionState.State.valueOf(commands[2]));
 
 Review comment:
   Yeah, because we are already returning output of _setRegionState_ method, a 
_break_ would be unreachable. Maybe we should change _setRegionState_ case 
handling to become consistent with other methods? Probably on a separate jira. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to