Package org.apache.flink.client.cli
Interface CustomCommandLine
-
- All Known Implementing Classes:
AbstractCustomCommandLine
,DefaultCLI
,FallbackYarnSessionCli
,FlinkYarnSessionCli
,GenericCLI
public interface CustomCommandLine
Custom command-line interface to load hooks for the command-line interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default 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.default org.apache.commons.cli.CommandLine
parseCommandLineOptions(String[] args, boolean stopAtNonOptions)
Configuration
toConfiguration(org.apache.commons.cli.CommandLine commandLine)
Materializes the command line arguments in the givenCommandLine
to aConfiguration
and returns it.
-
-
-
Method Detail
-
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
Configuration toConfiguration(org.apache.commons.cli.CommandLine commandLine) throws FlinkException
Materializes the command line arguments in the givenCommandLine
to aConfiguration
and returns it.- Throws:
FlinkException
-
parseCommandLineOptions
default org.apache.commons.cli.CommandLine parseCommandLineOptions(String[] args, boolean stopAtNonOptions) throws CliArgsException
- Throws:
CliArgsException
-
-