Package org.apache.flink.client.cli
Class AbstractCustomCommandLine
- java.lang.Object
-
- org.apache.flink.client.cli.AbstractCustomCommandLine
-
- All Implemented Interfaces:
CustomCommandLine
- Direct Known Subclasses:
DefaultCLI
public abstract class AbstractCustomCommandLine extends Object implements CustomCommandLine
Base class forCustomCommandLineimplementations which specify a JobManager address and a ZooKeeper namespace.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.cli.OptionzookeeperNamespaceOption
-
Constructor Summary
Constructors Constructor Description AbstractCustomCommandLine()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGeneralOptions(org.apache.commons.cli.Options baseOptions)Adds custom options to the existing general options.voidaddRunOptions(org.apache.commons.cli.Options baseOptions)Adds custom options to the existing run options.static inthandleCliArgsException(CliArgsException e, org.slf4j.Logger logger)static inthandleError(Throwable t, org.slf4j.Logger logger)protected voidprintUsage()org.apache.flink.configuration.ConfigurationtoConfiguration(org.apache.commons.cli.CommandLine commandLine)Materializes the command line arguments in the givenCommandLineto aConfigurationand returns it.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.client.cli.CustomCommandLine
getId, isActive, parseCommandLineOptions
-
-
-
-
Method Detail
-
addRunOptions
public void addRunOptions(org.apache.commons.cli.Options baseOptions)
Description copied from interface:CustomCommandLineAdds custom options to the existing run options.- Specified by:
addRunOptionsin interfaceCustomCommandLine- Parameters:
baseOptions- The existing options.
-
addGeneralOptions
public void addGeneralOptions(org.apache.commons.cli.Options baseOptions)
Description copied from interface:CustomCommandLineAdds custom options to the existing general options.- Specified by:
addGeneralOptionsin interfaceCustomCommandLine- Parameters:
baseOptions- The existing options.
-
toConfiguration
public org.apache.flink.configuration.Configuration toConfiguration(org.apache.commons.cli.CommandLine commandLine) throws org.apache.flink.util.FlinkExceptionDescription copied from interface:CustomCommandLineMaterializes the command line arguments in the givenCommandLineto aConfigurationand returns it.- Specified by:
toConfigurationin interfaceCustomCommandLine- Throws:
org.apache.flink.util.FlinkException
-
printUsage
protected void printUsage()
-
handleCliArgsException
public static int handleCliArgsException(CliArgsException e, org.slf4j.Logger logger)
-
handleError
public static int handleError(Throwable t, org.slf4j.Logger logger)
-
-