Package com.beust.jcommander

Examples of com.beust.jcommander.JCommander.usage()


    }

    // all input types except Hive require input paths
    if(!this.inputType.equals(InputType.HIVE) && this.input == null) {
      System.err.println("Input path must be provided.");
      jComm.usage();
      return -1;
    }

    // validate we have all needed args for Cascading integration
    if(this.inputType.equals(InputType.CASCADING) && this.cascadingColumns == null) {
View Full Code Here


    // validate we have all needed args for Cascading integration
    if(this.inputType.equals(InputType.CASCADING) && this.cascadingColumns == null) {
      System.err
          .println("A comma-separated list of column names must be provided for reading Cascading Tuple files.");
      jComm.usage();
      return -1;
    }

    // validate we have all needed args for Hive integration
    if(this.inputType.equals(InputType.HIVE) && (this.hiveDbName == null || this.hiveTableName == null)) {
View Full Code Here

    // validate we have all needed args for Hive integration
    if(this.inputType.equals(InputType.HIVE) && (this.hiveDbName == null || this.hiveTableName == null)) {
      System.err
          .println("When using input type HIVE, both db name and table name must be provided using appropriated arguments.");
      jComm.usage();
      return -1;
    }
   
    TableBuilder tableBuilder;
View Full Code Here

    try {
      jComm.parse(args);
    } catch(ParameterException e) {
      System.out.println(e.getMessage());
      System.out.println();
      jComm.usage();
      System.exit(-1);
    } catch(Throwable t) {
      t.printStackTrace();
      jComm.usage();
      System.exit(-1);
View Full Code Here

      System.out.println();
      jComm.usage();
      System.exit(-1);
    } catch(Throwable t) {
      t.printStackTrace();
      jComm.usage();
      System.exit(-1);
    }

    benchmarkTool.start();
    System.exit(0);
View Full Code Here

        SwiftGeneratorCommandLineConfig cliConfig = new SwiftGeneratorCommandLineConfig();
        JCommander jCommander = new JCommander(cliConfig, args);
        jCommander.setProgramName(SwiftGenerator.class.getSimpleName());

        if (cliConfig.inputFiles == null) {
            jCommander.usage();
            return;
        }

        SwiftGeneratorConfig.Builder configBuilder = SwiftGeneratorConfig.builder()
                .inputBase(workingDirectory)
View Full Code Here

            return;
        }

        // Special cases
        if (config.help) {
            jc.usage();
            return;
        } else if (config.version) {
            try {
                Properties p = new Properties();
                InputStream is = Cli.class.getResourceAsStream(
View Full Code Here

    jComm.setProgramName("Benchmark-Store Tool");
    try {
      jComm.parse(args);
    } catch (ParameterException e){
      System.out.println(e.getMessage());
      jComm.usage();
      return -1;
    } catch(Throwable t) {
      t.printStackTrace();
      jComm.usage();
      return -1;
View Full Code Here

      System.out.println(e.getMessage());
      jComm.usage();
      return -1;
    } catch(Throwable t) {
      t.printStackTrace();
      jComm.usage();
      return -1;
    }

    // Create some input files that will represent the partitions to generate
    Path out = new Path(output);
View Full Code Here

    jComm.setProgramName("Identity Job");
    try {
      jComm.parse(params);
    } catch(ParameterException e) {
      System.err.println(e.getMessage());
      jComm.usage();
      System.exit(-1);
    }

    Path outP = new Path(outputPath);
    HadoopUtils.deleteIfExists(FileSystem.get(conf), outP);
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.