Examples of printHelp()


Examples of org.apache.commons.cli.HelpFormatter.printHelp()

  }

  private static void printUsageAndExit(Options options, int exitCode)
      throws ExitCodeException {
    HelpFormatter formatter = new HelpFormatter();
    formatter.printHelp("Thrift", null, options,
        "To start the Thrift server run 'bin/hbase-daemon.sh start thrift'\n" +
        "To shutdown the thrift server run 'bin/hbase-daemon.sh stop " +
        "thrift' or send a kill signal to the thrift server pid",
        true);
    throw new ExitCodeException(exitCode, "");
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

      } catch( ParseException exp ) {
          // oops, something went wrong
          System.err.println( "Parsing failed.  Reason: " + exp.getMessage() );
         
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp( "list", options );
      }       
    }
           
}
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

        }
        File file = new File(command.getOptionValue("file", defaultFile));

        if (command.hasOption("help")) {
            HelpFormatter formatter = new HelpFormatter();
            formatter.printHelp("java -jar " + file.getName(), options, true);
        } else if (command.hasOption("notice")) {
            copyToOutput("/META-INF/NOTICE.txt");
        } else if (command.hasOption("license")) {
            copyToOutput("/META-INF/LICENSE.txt");
        } else if (command.hasOption("cli")) {
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

        "File to scan. Pass full-path; e.g. hdfs://a:9000/hbase/.META./12/34");
      options.addOption("r", "region", true,
        "Region to scan. Pass region name; e.g. '.META.,,1'");
      if (args.length == 0) {
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp("HFile ", options, true);
        System.exit(-1);
      }
      CommandLineParser parser = new PosixParser();
      CommandLine cmd = parser.parse(options, args);
      boolean verbose = cmd.hasOption("v");
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

  public void printUsage()
  {
    HelpFormatter help = new HelpFormatter();
    help.setWidth(100);
    help.printHelp("java " + AvroConvertMain.class.getName() + " [options]", _options);
  }

  public boolean hasOptions()
  {
    return _cmdLine.getOptions().length > 0;
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

  }

  private static void printCliHelp(Options cliOptions)
  {
    HelpFormatter helpFormatter = new HelpFormatter();
    helpFormatter.printHelp("java " + BootstrapAddSource.class.getName(), cliOptions);
  }


  public static class Config
  {
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

  }

  private static void printCliHelp(Options cliOptions)
  {
    HelpFormatter helpFormatter = new HelpFormatter();
    helpFormatter.printHelp("java " + BootstrapDBCleanerMain.class.getName(), cliOptions);
  }

  private static void updatePropsFromCmdLine(Properties props, String cmdLinePropString)
  {
    String[] cmdLinePropSplit = cmdLinePropString.split(";");
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

  }

    private static void printCliHelp(Options cliOptions)
    {
      HelpFormatter helpFormatter = new HelpFormatter();
      helpFormatter.printHelp("java " + BootstrapSeederMain.class.getName(), cliOptions);
    }
  public static class StaticConfig
  {
    public SchemaRegistryStaticConfig getSchemaRegistry()
    {
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

  }

    private static void printCliHelp(Options cliOptions)
    {
      HelpFormatter helpFormatter = new HelpFormatter();
      helpFormatter.printHelp("java " + BootstrapSeederMain.class.getName(), cliOptions);
    }

  public static class StaticConfig
  {
    public SchemaRegistryStaticConfig getSchemaRegistry()
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

  }

  private static void printCliHelp(Options cliOptions)
  {
    HelpFormatter helpFormatter = new HelpFormatter();
    helpFormatter.printHelp("java " + BootstrapSeederMain.class.getName(), cliOptions);
  }

  public static class StaticConfig
  {
    private final Integer sourceId;
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.