static void printUsage(boolean longUsage, String toolName, Command[] commands) { Preconditions.checkNotNull(commands); System.err.println("Usage: bin/hdfs " + toolName + " [COMMAND]"); final HelpCommand helpCommand = new HelpCommand(commands); for (AdminHelper.Command command : commands) { if (longUsage) { System.err.print(command.getLongUsage()); } else { System.err.print(" " + command.getShortUsage()); } } System.err.print(longUsage ? helpCommand.getLongUsage() : (" " + helpCommand.getShortUsage())); System.err.println(); }
static void printUsage(boolean longUsage, String toolName, Command[] commands) { Preconditions.checkNotNull(commands); System.err.println("Usage: bin/hdfs " + toolName + " [COMMAND]"); final HelpCommand helpCommand = new HelpCommand(commands); for (AdminHelper.Command command : commands) { if (longUsage) { System.err.print(command.getLongUsage()); } else { System.err.print(" " + command.getShortUsage()); } } System.err.print(longUsage ? helpCommand.getLongUsage() : (" " + helpCommand.getShortUsage())); System.err.println(); }
static void printUsage(boolean longUsage, String toolName, Command[] commands) { Preconditions.checkNotNull(commands); System.err.println("Usage: bin/hdfs " + toolName + " [COMMAND]"); final HelpCommand helpCommand = new HelpCommand(commands); for (AdminHelper.Command command : commands) { if (longUsage) { System.err.print(command.getLongUsage()); } else { System.err.print(" " + command.getShortUsage()); } } System.err.print(longUsage ? helpCommand.getLongUsage() : (" " + helpCommand.getShortUsage())); System.err.println(); }
@Override public String getLongUsage() { final TableListing listing = AdminHelper.getOptionDescriptionListing(); listing.addRow("<command-name>", "The command for which to get " + "detailed help. If no command is specified, print detailed help for " + "all commands"); return getShortUsage() + "\n" + "Get detailed help about a command.\n\n" + listing.toString(); }
@Override public String getLongUsage() { final TableListing listing = AdminHelper.getOptionDescriptionListing(); listing.addRow("<command-name>", "The command for which to get " + "detailed help. If no command is specified, print detailed help for " + "all commands"); return getShortUsage() + "\n" + "Get detailed help about a command.\n\n" + listing.toString(); }
@Override public String getLongUsage() { final TableListing listing = AdminHelper.getOptionDescriptionListing(); listing.addRow("<command-name>", "The command for which to get " + "detailed help. If no command is specified, print detailed help for " + "all commands"); return getShortUsage() + "\n" + "Get detailed help about a command.\n\n" + listing.toString(); }