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
,FallbackYarnSessionCli
,FlinkYarnSessionCli
public abstract class AbstractCustomCommandLine extends Object implements CustomCommandLine
Base class forCustomCommandLine
implementations which specify a JobManager address and a ZooKeeper namespace.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.cli.Option
zookeeperNamespaceOption
-
Constructor Summary
Constructors Constructor Description AbstractCustomCommandLine()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGeneralOptions(org.apache.commons.cli.Options baseOptions)
Adds custom options to the existing general options.void
addRunOptions(org.apache.commons.cli.Options baseOptions)
Adds custom options to the existing run options.static int
handleCliArgsException(CliArgsException e, org.slf4j.Logger logger)
static int
handleError(Throwable t, org.slf4j.Logger logger)
protected void
printUsage()
Configuration
toConfiguration(org.apache.commons.cli.CommandLine commandLine)
Materializes the command line arguments in the givenCommandLine
to aConfiguration
and 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:CustomCommandLine
Adds custom options to the existing run options.- Specified by:
addRunOptions
in interfaceCustomCommandLine
- Parameters:
baseOptions
- The existing options.
-
addGeneralOptions
public void addGeneralOptions(org.apache.commons.cli.Options baseOptions)
Description copied from interface:CustomCommandLine
Adds custom options to the existing general options.- Specified by:
addGeneralOptions
in interfaceCustomCommandLine
- Parameters:
baseOptions
- The existing options.
-
toConfiguration
public Configuration toConfiguration(org.apache.commons.cli.CommandLine commandLine) throws FlinkException
Description copied from interface:CustomCommandLine
Materializes the command line arguments in the givenCommandLine
to aConfiguration
and returns it.- Specified by:
toConfiguration
in interfaceCustomCommandLine
- Throws:
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)
-
-