Package net.sourceforge.argparse4j.inf

Examples of net.sourceforge.argparse4j.inf.ArgumentParser.addArgument()


              "forms a queue of jobs, this lets short jobs finish in reasonable time while not starving long jobs. " +
              "It is also an easy way to share a cluster between multiple of users. Fair sharing can also work with " +
              "job priorities - the priorities are used as weights to determine the fraction of total compute time " +
              "that each job gets.");
 
      Argument dryRunArg = parser.addArgument("--dry-run")
        .action(Arguments.storeTrue())
        .help("Run in local mode and print documents to stdout instead of loading them into Solr. This executes " +
              "the morphline in the client process (without submitting a job to MR) for quicker turnaround during " +
              "early trial & debug sessions.");
   
View Full Code Here


        .action(Arguments.storeTrue())
        .help("Run in local mode and print documents to stdout instead of loading them into Solr. This executes " +
              "the morphline in the client process (without submitting a job to MR) for quicker turnaround during " +
              "early trial & debug sessions.");
   
      Argument log4jConfigFileArg = parser.addArgument("--log4j")
        .metavar("FILE")
        .type(new FileArgumentType().verifyExists().verifyIsFile().verifyCanRead())
        .help("Relative or absolute path to a log4j.properties config file on the local file system. This file " +
              "will be uploaded to each MR task. Example: /path/to/log4j.properties");
   
View Full Code Here

        .metavar("FILE")
        .type(new FileArgumentType().verifyExists().verifyIsFile().verifyCanRead())
        .help("Relative or absolute path to a log4j.properties config file on the local file system. This file " +
              "will be uploaded to each MR task. Example: /path/to/log4j.properties");
   
      Argument verboseArg = parser.addArgument("--verbose", "-v")
        .action(Arguments.storeTrue())
        .help("Turn on verbose output.");
 
      parser.addArgument(SHOW_NON_SOLR_CLOUD)
        .action(Arguments.storeTrue())
View Full Code Here

   
      Argument verboseArg = parser.addArgument("--verbose", "-v")
        .action(Arguments.storeTrue())
        .help("Turn on verbose output.");
 
      parser.addArgument(SHOW_NON_SOLR_CLOUD)
        .action(Arguments.storeTrue())
        .help("Also show options for Non-SolrCloud mode as part of --help.");
     
      ArgumentGroup clusterInfoGroup = parser
          .addArgumentGroup("Cluster arguments")
View Full Code Here

        .choices(new RangeArgumentChoice(1, Integer.MAX_VALUE))
        .setDefault(1000)
        .help("Tuning knob that indicates the maximum number of live merges to run in parallel at one time.");
     
      // trailing positional arguments
      Argument inputFilesArg = parser.addArgument("input-files")
        .metavar("HDFS_URI")
        .type(new PathArgumentType(conf).verifyHasScheme().verifyExists().verifyCanRead())
        .nargs("*")
        .setDefault()
        .help("HDFS URI of file or directory tree to index.");
View Full Code Here

    }

    private static Namespace parseCommandLine(String[] args) throws ArgumentParserException {
        String usage = "java -jar " + new JarLocation(DictionaryUser.class);
        ArgumentParser argParser = ArgumentParsers.newArgumentParser(usage).defaultHelp(true);
        argParser.addArgument("config-file").nargs("?").help("yaml configuration file");
        argParser.addArgument("word-file").nargs("+").help("one or more files containing words");
        return argParser.parseArgs(args);
    }

    private static DictionaryConfiguration loadConfigFile(String configFile)
View Full Code Here

    private static Namespace parseCommandLine(String[] args) throws ArgumentParserException {
        String usage = "java -jar " + new JarLocation(DictionaryUser.class);
        ArgumentParser argParser = ArgumentParsers.newArgumentParser(usage).defaultHelp(true);
        argParser.addArgument("config-file").nargs("?").help("yaml configuration file");
        argParser.addArgument("word-file").nargs("+").help("one or more files containing words");
        return argParser.parseArgs(args);
    }

    private static DictionaryConfiguration loadConfigFile(String configFile)
            throws IOException, ConfigurationException {
View Full Code Here

                        "perform the Jolt Diffy operation to detect any differences. The program will return and exit code of " +
                        "0 if no differences are found or a 1 if a difference is found or an error is encountered." )
                .defaultHelp( true );

        File nullFile = null;
        parser.addArgument( "filePath1" ).help( "File path to feed to Input #1 for the Diffy operation. " +
                "This file should contain properly formatted JSON." )
                .type( Arguments.fileType().verifyExists().verifyIsFile().verifyCanRead() );
        parser.addArgument( "filePath2" ).help( "File path to feed to Input #2 for the Diffy operation. " +
                "This file should contain properly formatted JSON. " +
                "This argument is mutually exclusive with -i; one or the other should be specified." )
View Full Code Here

        File nullFile = null;
        parser.addArgument( "filePath1" ).help( "File path to feed to Input #1 for the Diffy operation. " +
                "This file should contain properly formatted JSON." )
                .type( Arguments.fileType().verifyExists().verifyIsFile().verifyCanRead() );
        parser.addArgument( "filePath2" ).help( "File path to feed to Input #2 for the Diffy operation. " +
                "This file should contain properly formatted JSON. " +
                "This argument is mutually exclusive with -i; one or the other should be specified." )
                .type( Arguments.fileType().verifyExists().verifyIsFile().verifyCanRead() )
                .nargs( "?" ).setDefault( nullFile );   // these last two method calls make filePath2 optional
View Full Code Here

                "This file should contain properly formatted JSON. " +
                "This argument is mutually exclusive with -i; one or the other should be specified." )
                .type( Arguments.fileType().verifyExists().verifyIsFile().verifyCanRead() )
                .nargs( "?" ).setDefault( nullFile );   // these last two method calls make filePath2 optional

        parser.addArgument( "-s" ).help( "Diffy will suppress output and run silently." )
                .action( Arguments.storeTrue() );
        parser.addArgument( "-a" ).help( "Diffy will not consider array order when detecting differences" )
                .action( Arguments.storeTrue() );
        parser.addArgument( "-i" ).help( "Diffy will use standard in as input for Input #2 rather than the filePath2 argument. " +
                "Standard in should contain properly formatted JSON." )
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.