Examples of printHelpOn()


Examples of joptsimple.OptionParser.printHelpOn()

            parser.printHelpOn(System.out);
            System.exit(0);
        }

        if(!options.has(Benchmark.RECORD_COUNT) || !options.has(Benchmark.OPS_COUNT)) {
            parser.printHelpOn(System.out);
            Utils.croak("Missing params");
            System.exit(0);
        }

        Props props = new Props();
View Full Code Here

Examples of joptsimple.OptionParser.printHelpOn()

        OptionSet options = null;
        try {
            parser = getParser();
            options = parser.parse(args);
        } catch(OptionException oe) {
            parser.printHelpOn(System.out);
            printUsageAndDie("Exception when parsing arguments : " + oe.getMessage());
            return;
        }

        /* validate options */
 
View Full Code Here

Examples of joptsimple.OptionParser.printHelpOn()

            return;
        }

        /* validate options */
        if(options.hasArgument("help")) {
            parser.printHelpOn(System.out);
            printUsage();
            return;
        }
        if(!options.hasArgument("url") || !options.hasArgument("out-dir")) {
            parser.printHelpOn(System.out);
View Full Code Here

Examples of joptsimple.OptionParser.printHelpOn()

            parser.printHelpOn(System.out);
            printUsage();
            return;
        }
        if(!options.hasArgument("url") || !options.hasArgument("out-dir")) {
            parser.printHelpOn(System.out);
            printUsageAndDie("Missing a required argument.");
            return;
        }

        String url = (String) options.valueOf("url");
View Full Code Here

Examples of joptsimple.OptionParser.printHelpOn()

    OptionSet options;
    try {
      options = parser.parse(args);
    } catch(OptionException e) {
      System.err.println(e.getMessage());
      parser.printHelpOn(System.out);
      System.exit(-1);
      return;
    }

    configureLogging();
View Full Code Here

Examples of joptsimple.OptionParser.printHelpOn()

              .withRequiredArg()
              .ofType(Long.class);

        OptionSet options = parser.parse(args);
        if(options.has("help")) {
            parser.printHelpOn(System.out);
            System.exit(0);
        }

        Set<String> missing = CmdUtils.missing(options, "cluster", "name", "file", "push-version");
        if(missing.size() > 0) {
View Full Code Here

Examples of joptsimple.OptionParser.printHelpOn()

        Set<String> missing = CmdUtils.missing(options, "cluster", "name", "file", "push-version");
        if(missing.size() > 0) {
            if(!(missing.equals(ImmutableSet.of("file")) && (options.has("rollback")))) {
                System.err.println("Missing required arguments: " + Joiner.on(", ").join(missing));
                parser.printHelpOn(System.err);
                System.exit(1);
            }
        }

        String clusterXml = (String) options.valueOf("cluster");
View Full Code Here

Examples of joptsimple.OptionParser.printHelpOn()

        OptionSet options = parser.parse(args);

        if(!options.has("cluster-xml") || !options.has("src") || !options.has("dest")
           || !options.has("store") || !options.has("from-format") || !options.has("to-format")) {
            parser.printHelpOn(System.err);
            System.exit(0);
        }

        String clusterXmlPath = CmdUtils.valueOf(options, "cluster-xml", null);
        String sourceEnvPath = CmdUtils.valueOf(options, "src", null);
View Full Code Here

Examples of joptsimple.OptionParser.printHelpOn()

        String fromFormat = CmdUtils.valueOf(options, "from-format", null);
        String toFormat = CmdUtils.valueOf(options, "to-format", null);

        if(!isValidFormat(fromFormat) || !isValidFormat(toFormat)) {
            parser.printHelpOn(System.err);
            System.exit(0);
        }

        Integer logFileSize = CmdUtils.valueOf(options, "je-log-size", 60);
        Integer nodeMax = CmdUtils.valueOf(options, "btree-nodemax", 512);
View Full Code Here

Examples of joptsimple.OptionParser.printHelpOn()

        parser.accepts("string-keys");

        OptionSet options = parser.parse(args);

        if(options.has("help")) {
            parser.printHelpOn(System.out);
            System.exit(0);
        }

        Set<String> missing = CmdUtils.missing(options,
                                               "node",
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.