Search in sources :

Example 36 with HelpFormatter

use of org.apache.commons.cli.HelpFormatter in project flink by apache.

the class CliFrontendParser method printHelpForCancel.

public static void printHelpForCancel() {
    HelpFormatter formatter = new HelpFormatter();
    formatter.setLeftPadding(5);
    formatter.setWidth(80);
    System.out.println("\nAction \"cancel\" cancels a running program.");
    System.out.println("\n  Syntax: cancel [OPTIONS] <Job ID>");
    formatter.setSyntaxPrefix("  \"cancel\" action options:");
    formatter.printHelp(" ", getCancelOptionsWithoutDeprecatedOptions(new Options()));
    printCustomCliOptions(formatter, false);
    System.out.println();
}
Also used : HelpFormatter(org.apache.commons.cli.HelpFormatter) Options(org.apache.commons.cli.Options)

Example 37 with HelpFormatter

use of org.apache.commons.cli.HelpFormatter in project databus by linkedin.

the class BootstrapAvroFileSeederMain method printCliHelp.

private static void printCliHelp(Options cliOptions) {
    HelpFormatter helpFormatter = new HelpFormatter();
    helpFormatter.printHelp("java " + BootstrapSeederMain.class.getName(), cliOptions);
}
Also used : HelpFormatter(org.apache.commons.cli.HelpFormatter)

Example 38 with HelpFormatter

use of org.apache.commons.cli.HelpFormatter in project databus by linkedin.

the class BootstrapSeederMain method printCliHelp.

private static void printCliHelp(Options cliOptions) {
    HelpFormatter helpFormatter = new HelpFormatter();
    helpFormatter.printHelp("java " + BootstrapSeederMain.class.getName(), cliOptions);
}
Also used : HelpFormatter(org.apache.commons.cli.HelpFormatter)

Example 39 with HelpFormatter

use of org.apache.commons.cli.HelpFormatter in project databus by linkedin.

the class BootstrapTableReader method printCliHelp.

private static void printCliHelp(Options cliOptions) {
    HelpFormatter helpFormatter = new HelpFormatter();
    helpFormatter.printHelp("java " + BootstrapSeederMain.class.getName(), cliOptions);
}
Also used : HelpFormatter(org.apache.commons.cli.HelpFormatter)

Example 40 with HelpFormatter

use of org.apache.commons.cli.HelpFormatter in project databus by linkedin.

the class BootstrapAddSource method printCliHelp.

private static void printCliHelp(Options cliOptions) {
    HelpFormatter helpFormatter = new HelpFormatter();
    helpFormatter.printHelp("java " + BootstrapAddSource.class.getName(), cliOptions);
}
Also used : HelpFormatter(org.apache.commons.cli.HelpFormatter)

Aggregations

HelpFormatter (org.apache.commons.cli.HelpFormatter)273 Options (org.apache.commons.cli.Options)136 CommandLine (org.apache.commons.cli.CommandLine)126 CommandLineParser (org.apache.commons.cli.CommandLineParser)110 ParseException (org.apache.commons.cli.ParseException)103 GnuParser (org.apache.commons.cli.GnuParser)92 Path (org.apache.hadoop.fs.Path)42 PrintWriter (java.io.PrintWriter)35 Option (org.apache.commons.cli.Option)29 Job (org.apache.hadoop.mapreduce.Job)27 Configuration (org.apache.hadoop.conf.Configuration)21 File (java.io.File)17 IOException (java.io.IOException)14 DefaultParser (org.apache.commons.cli.DefaultParser)13 PosixParser (org.apache.commons.cli.PosixParser)12 FileSystem (org.apache.hadoop.fs.FileSystem)12 BasicParser (org.apache.commons.cli.BasicParser)11 ArrayList (java.util.ArrayList)8 URI (java.net.URI)6 FSDataOutputStream (org.apache.hadoop.fs.FSDataOutputStream)6