Package org.apache.flink.client.cli
Class GenericCLI
java.lang.Object
org.apache.flink.client.cli.GenericCLI
- All Implemented Interfaces:
CustomCommandLine
A generic implementation of the
CustomCommandLine that only expects the execution.target
parameter to be explicitly specified and simply forwards the rest of the options specified with
-D to the corresponding PipelineExecutor for further parsing.-
Constructor Summary
ConstructorsConstructorDescriptionGenericCLI(org.apache.flink.configuration.Configuration configuration, String configDir) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGeneralOptions(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.getId()Gets the unique identifier of this CustomCommandLine.booleanisActive(org.apache.commons.cli.CommandLine commandLine) Signals whether the custom command-line wants to execute or not.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, waitMethods inherited from interface org.apache.flink.client.cli.CustomCommandLine
parseCommandLineOptions
-
Constructor Details
-
GenericCLI
-
-
Method Details
-
isActive
public boolean isActive(org.apache.commons.cli.CommandLine commandLine) Description copied from interface:CustomCommandLineSignals whether the custom command-line wants to execute or not.- Specified by:
isActivein interfaceCustomCommandLine- Parameters:
commandLine- The command-line options- Returns:
- True if the command-line wants to run, False otherwise
-
getId
Description copied from interface:CustomCommandLineGets the unique identifier of this CustomCommandLine.- Specified by:
getIdin interfaceCustomCommandLine- Returns:
- A unique identifier
-
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) Description copied from interface:CustomCommandLineMaterializes the command line arguments in the givenCommandLineto aConfigurationand returns it.- Specified by:
toConfigurationin interfaceCustomCommandLine
-