Package com.beust.jcommander

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


    final JCommander jCommander = new JCommander(args);
    try {
      jCommander.parse(rawArgs);
    } catch(ParameterException e) {
      log.warn("could not start photon: " + e.getMessage());
      jCommander.usage();
      return;
    }

    // show help
    if(args.isUsage()) {
View Full Code Here


      return;
    }

    // show help
    if(args.isUsage()) {
      jCommander.usage();
      return;
    }

    if(args.getJsonDump() != null) {
      try {
View Full Code Here

        CommandLineParameters params = new CommandLineParameters();
        try {
            JCommander jc = new JCommander(params, args);
            if (params.help) {
                jc.setProgramName("java -Xmx[several]G -jar otp.jar");
                jc.usage();
                System.exit(0);
            }
            params.infer();
        } catch (ParameterException pex) {
            LOG.error("Parameter error: {}", pex.getMessage());
View Full Code Here

    jComm.setProgramName("Splout DNode Killer");
    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;
    }

    SploutClient client = new SploutClient(qnode);
    List<String> dnodes = client.dNodeList();
View Full Code Here

    jComm.setProgramName("Tablespaces Deployer");
    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;
    }

    StoreDeployerTool deployer = new StoreDeployerTool(qnode, getConf());
View Full Code Here

      });
    } else {
      Path rootPath = new Path(root);
      if (tablespaceName == null && tablespaces.size() == 0) {
        System.err.println("Tablespace name for root folder or tablespaces contained in them is lacking. Either use tablespacename or tablespaces option.");
        jComm.usage();
        return -1;
      }
      if (tablespaceName != null && tablespaces.size() > 0) {
        System.err.println("Can't use tablespacename and tablespaces at the same time. Root is to be either a generated tablespace or a folder with multiple generated tablespaces.");
        jComm.usage();
View Full Code Here

        jComm.usage();
        return -1;
      }
      if (tablespaceName != null && tablespaces.size() > 0) {
        System.err.println("Can't use tablespacename and tablespaces at the same time. Root is to be either a generated tablespace or a folder with multiple generated tablespaces.");
        jComm.usage();
        return -1;
      }
      if (tablespaceName != null) {
        deployments.add(new TablespaceDepSpec(tablespaceName, rootPath.toString(), replicationFactor, initStatements));
      }
View Full Code Here

    jComm.setProgramName("Splout Hadoop Compatibility Integration Test");
    try {
      jComm.parse(args);
    } catch(ParameterException e) {
      System.err.println(e.getMessage());
      jComm.usage();
      System.exit(-1);
    }
   
    Path tmpHdfsPath = new Path("tmp-" + HadoopIntegrationTest.class.getName() + "-"
        + System.currentTimeMillis());
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.