ksravista commented on code in PR #143:
URL:
https://github.com/apache/hbase-operator-tools/pull/143#discussion_r1640385749
##########
hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java:
##########
@@ -1345,6 +1350,71 @@ private int doCommandLine(CommandLine commandLine,
Options options) throws IOExc
return EXIT_SUCCESS;
}
+ static int showUsagePerCommand(String command, Options options) {
+ StringWriter sw = new StringWriter();
+ PrintWriter writer = new PrintWriter(sw);
+ writer.println("Command:");
+
+ boolean invalidCommand = false;
+ switch (command) {
+ case ADD_MISSING_REGIONS_IN_META_FOR_TABLES:
+ usageAddFsRegionsMissingInMeta(writer);
+ break;
+ case ASSIGNS:
+ usageAssigns(writer);
+ break;
+ case BYPASS:
+ usageBypass(writer);
+ break;
+ case FILESYSTEM:
+ usageFilesystem(writer);
+ break;
+ case FIX_META:
+ usageFixMeta(writer);
+ break;
+ case GENERATE_TABLE_INFO:
+ usageGenerateMissingTableInfo(writer);
+ break;
+ case REPLICATION:
+ usageReplication(writer);
+ break;
+ case EXTRA_REGIONS_IN_META:
+ usageExtraRegionsInMeta(writer);
+ break;
+ case REPORT_MISSING_REGIONS_IN_META:
+ usageReportMissingRegionsInMeta(writer);
+ break;
+ case SET_REGION_STATE:
+ usageSetRegionState(writer);
+ break;
+ case SET_TABLE_STATE:
+ usageSetTableState(writer);
+ break;
+ case SCHEDULE_RECOVERIES:
+ usageScheduleRecoveries(writer);
+ break;
+ case RECOVER_UNKNOWN:
+ usageRecoverUnknown(writer);
+ break;
+ case UNASSIGNS:
+ usageUnassigns(writer);
+ break;
+ case REGIONINFO_MISMATCH:
+ usageRegioninfoMismatch(writer);
+ break;
+ default:
+ showErrorMessage("Invalid arg: " + command);
+ invalidCommand = true;
+ break;
+ }
+ writer.close();
Review Comment:
will add in next rev
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]