Package org.apache.flink.client.cli
Class GenericCLI
- java.lang.Object
-
- org.apache.flink.client.cli.GenericCLI
-
- All Implemented Interfaces:
CustomCommandLine
@Internal public class GenericCLI extends Object implements CustomCommandLine
A generic implementation of theCustomCommandLine
that only expects the execution.target parameter to be explicitly specified and simply forwards the rest of the options specified with -D to the correspondingPipelineExecutor
for further parsing.
-
-
Constructor Summary
Constructors Constructor Description GenericCLI(Configuration configuration, String configDir)
-
Method Summary
All 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.String
getId()
Gets the unique identifier of this CustomCommandLine.boolean
isActive(org.apache.commons.cli.CommandLine commandLine)
Signals whether the custom command-line wants to execute or not.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
parseCommandLineOptions
-
-
-
-
Constructor Detail
-
GenericCLI
public GenericCLI(Configuration configuration, String configDir)
-
-
Method Detail
-
isActive
public boolean isActive(org.apache.commons.cli.CommandLine commandLine)
Description copied from interface:CustomCommandLine
Signals whether the custom command-line wants to execute or not.- Specified by:
isActive
in interfaceCustomCommandLine
- Parameters:
commandLine
- The command-line options- Returns:
- True if the command-line wants to run, False otherwise
-
getId
public String getId()
Description copied from interface:CustomCommandLine
Gets the unique identifier of this CustomCommandLine.- Specified by:
getId
in interfaceCustomCommandLine
- Returns:
- A unique identifier
-
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)
Description copied from interface:CustomCommandLine
Materializes the command line arguments in the givenCommandLine
to aConfiguration
and returns it.- Specified by:
toConfiguration
in interfaceCustomCommandLine
-
-