public static void printHelper(OptionParser parser) { try { System.out.println("vjtop " + VERSION + " - java monitoring for the command-line"); System.out.println("Usage: vjtop.sh [options...] <PID>"); System.out.println(""); parser.printHelpOn(System.out); } catch (IOException ignored) { } }
public static void croakIfMissing(OptionParser parser, OptionSet options, String... required) { Set<String> missing = CmdUtils.missing(options, required); if(missing.size() > 0) { System.err.println("Missing required arguments: " + Joiner.on(", ").join(missing)); try { parser.printHelpOn(System.err); } catch(IOException e) { e.printStackTrace(); } System.exit(1); } }
public static void printUsage(String errMessage, OptionParser parser) { System.err.println("Error: " + errMessage); try { parser.printHelpOn(System.out); } catch(IOException ioe) { System.err.println("Caught IOException while trying to print out parser options: " + ioe.getMessage()); } printUsage(); System.exit(1); }
protected void usage(String string) { System.err.println(string); System.err.println(); try { buildOptionParser().printHelpOn(System.err); System.exit(1); } catch (IOException e) { } }
private static void printUsage() { StringBuilder help = new StringBuilder(); help.append("\n"); help.append("NAME\n"); help.append(" ReadOnlyReplicationHelper - Get read-only data files to replicate for a node \n"); help.append("\n"); help.append("SYNOPSIS\n"); help.append(" --" + OPT_URL + " <bootstrap-url> --" + OPT_NODE + " <node-id> [--" + OPT_OUTPUT + " <output-file-path>]\n"); help.append("\n"); System.out.print(help.toString()); try { parser.printHelpOn(System.out); } catch(IOException e) { e.printStackTrace(); } }
/** * Prints help menu for command. * * @param stream PrintStream object for output * @throws IOException */ public static void printHelp(PrintStream stream) throws IOException { stream.println(); stream.println("NAME"); stream.println(" async-job list - Get async job list from nodes"); stream.println(); stream.println("SYNOPSIS"); stream.println(" async-job list -u <url> [-n <node-id-list> | --all-nodes]"); stream.println(); getParser().printHelpOn(stream); stream.println(); }
/** * Prints help menu for command. * * @param stream PrintStream object for output * @throws IOException */ public static void printHelp(PrintStream stream) throws IOException { stream.println(); stream.println("NAME"); stream.println(" get - Get the store client config for the list of stores"); stream.println(); stream.println("SYNOPSIS"); stream.println(" get -s <store-name-list> -u <coordinator-url-list> [--verbose]"); stream.println(); getParser().printHelpOn(stream); stream.println(); }
/** * Prints help menu for command. * * @param stream PrintStream object for output * @throws IOException */ public static void printHelp(PrintStream stream) throws IOException { stream.println(); stream.println("NAME"); stream.println(" meta clear-rebalance - Remove metadata related to rebalancing"); stream.println(); stream.println("SYNOPSIS"); stream.println(" meta clear-rebalance -u <url> [-n <node-id-list> | --all-nodes] [--confirm]"); stream.println(); getParser().printHelpOn(stream); stream.println(); }
/** * Prints help menu for command. * * @param stream PrintStream object for output * @throws IOException */ public static void printHelp(PrintStream stream) throws IOException { stream.println(); stream.println("NAME"); stream.println(" store update - Update store definitions from a \'stores.xml\' file"); stream.println(); stream.println("SYNOPSIS"); stream.println(" store update -f <stores.xml-file-path> -u <url> [-n <node-id-list> | --all-nodes]"); stream.println(); getParser().printHelpOn(stream); stream.println(); }
/** * Prints help menu for command. * * @param stream PrintStream object for output * @throws IOException */ public static void printHelp(PrintStream stream) throws IOException { stream.println(); stream.println("NAME"); stream.println(" delete - Delete store config on coordinators"); stream.println(); stream.println("SYNOPSIS"); stream.println(" delete -u <url-list> -s <store-name-list> [--confirm]"); stream.println(); getParser().printHelpOn(stream); stream.println(); }
/** * Prints help menu for command. * * @param stream PrintStream object for output * @throws IOException */ public static void printHelp(PrintStream stream) throws IOException { stream.println(); stream.println("NAME"); stream.println(" scheduled stop - Stop scheduled jobs on one node"); stream.println(); stream.println("SYNOPSIS"); stream.println(" scheduled stop <job-id-list> -n <node-id> -u <url> [--confirm]"); stream.println(); getParser().printHelpOn(stream); stream.println(); }
/** * Prints help menu for command. * * @param stream PrintStream object for output * @throws IOException */ public static void printHelp(PrintStream stream) throws IOException { stream.println(); stream.println("NAME"); stream.println(" scheduled enable - Enable scheduled jobs on one node"); stream.println(); stream.println("SYNOPSIS"); stream.println(" scheduled enable <job-id-list> -n <node-id> -u <url> [--confirm]"); stream.println(); getParser().printHelpOn(stream); stream.println(); }
/** * Prints help menu for command. * * @param stream PrintStream object for output * @throws IOException */ public static void printHelp(PrintStream stream) throws IOException { stream.println(); stream.println("NAME"); stream.println(" debug route - Show detailed routing plan for a given set of keys on a store"); stream.println(); stream.println("SYNOPSIS"); stream.println(" debug route ((-x | -j) <key-list>) -s <store-name> -u <url>"); stream.println(); getParser().printHelpOn(stream); stream.println(); }
public static void printUsage(PrintStream out, OptionParser parser) throws IOException { out.println(usageStr); parser.printHelpOn(out); System.exit(1); }
public static void printUsage(PrintStream out, OptionParser parser) throws IOException { out.println(usageStr); parser.printHelpOn(out); System.exit(1); }
public static void printUsage(PrintStream out, OptionParser parser, String msg) throws IOException { out.println(msg); out.println(usageStr); parser.printHelpOn(out); System.exit(1); }
private static void printUsage(PrintStream out, OptionParser parser) throws IOException { out.println("Usage: $VOLDEMORT_HOME/bin/run-class.sh " + RoutedStoreParallelismTest.class.getName() + " [options]\n"); parser.printHelpOn(out); System.exit(1); }
public static void printUsage(PrintStream out, OptionParser parser, String msg) throws IOException { out.println(msg); out.println(usageStr); parser.printHelpOn(out); System.exit(1); }
protected void printUsage(OptionParser parser) { System.err.println("Usage: $VOLDEMORT_HOME/bin/run-class.sh " + getClass().getName() + " [options]\n"); try { parser.printHelpOn(System.err); } catch(IOException e) { e.printStackTrace(); } System.exit(1); }
private static void printUsage(OptionParser parser, String errorCommand) throws IOException { parser.printHelpOn(System.err); Utils.croak("Usage: $VOLDEMORT_HOME/bin/run-class.sh " + Benchmark.class.getName() + " [options]\n " + errorCommand); }