Package org.apache.flink.client.cli
Interface CustomCommandLine
- All Known Implementing Classes:
AbstractCustomCommandLine,DefaultCLI,GenericCLI
public interface CustomCommandLine
Custom command-line interface to load hooks for the command-line interface.
-
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.default org.apache.commons.cli.CommandLineparseCommandLineOptions(String[] args, boolean stopAtNonOptions) org.apache.flink.configuration.ConfigurationtoConfiguration(org.apache.commons.cli.CommandLine commandLine) Materializes the command line arguments in the givenCommandLineto aConfigurationand returns it.
-
Method Details
-
isActive
boolean isActive(org.apache.commons.cli.CommandLine commandLine) Signals whether the custom command-line wants to execute or not.- Parameters:
commandLine- The command-line options- Returns:
- True if the command-line wants to run, False otherwise
-
getId
String getId()Gets the unique identifier of this CustomCommandLine.- Returns:
- A unique identifier
-
addRunOptions
void addRunOptions(org.apache.commons.cli.Options baseOptions) Adds custom options to the existing run options.- Parameters:
baseOptions- The existing options.
-
addGeneralOptions
void addGeneralOptions(org.apache.commons.cli.Options baseOptions) Adds custom options to the existing general options.- Parameters:
baseOptions- The existing options.
-
toConfiguration
org.apache.flink.configuration.Configuration toConfiguration(org.apache.commons.cli.CommandLine commandLine) throws org.apache.flink.util.FlinkException Materializes the command line arguments in the givenCommandLineto aConfigurationand returns it.- Throws:
org.apache.flink.util.FlinkException
-
parseCommandLineOptions
default org.apache.commons.cli.CommandLine parseCommandLineOptions(String[] args, boolean stopAtNonOptions) throws CliArgsException - Throws:
CliArgsException
-