public interface CustomCommandLine<T>
Modifier and Type | Method and 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.
|
ClusterDescriptor<T> |
createClusterDescriptor(org.apache.commons.cli.CommandLine commandLine)
Create a
ClusterDescriptor from the given configuration, configuration directory
and the command line. |
T |
getClusterId(org.apache.commons.cli.CommandLine commandLine)
Returns the cluster id if a cluster id was specified on the command line, otherwise it
returns null.
|
ClusterSpecification |
getClusterSpecification(org.apache.commons.cli.CommandLine commandLine)
Returns the
ClusterSpecification specified by the configuration and the command
line 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) |
boolean isActive(org.apache.commons.cli.CommandLine commandLine)
commandLine
- The command-line optionsString getId()
void addRunOptions(org.apache.commons.cli.Options baseOptions)
baseOptions
- The existing options.void addGeneralOptions(org.apache.commons.cli.Options baseOptions)
baseOptions
- The existing options.ClusterDescriptor<T> createClusterDescriptor(org.apache.commons.cli.CommandLine commandLine) throws FlinkException
ClusterDescriptor
from the given configuration, configuration directory
and the command line.commandLine
- containing command line options relevant for the ClusterDescriptorFlinkException
- if the ClusterDescriptor could not be created@Nullable T getClusterId(org.apache.commons.cli.CommandLine commandLine)
A cluster id identifies a running cluster, e.g. the Yarn application id for a Flink cluster running on Yarn.
commandLine
- containing command line options relevant for the cluster id retrievalClusterSpecification getClusterSpecification(org.apache.commons.cli.CommandLine commandLine) throws FlinkException
ClusterSpecification
specified by the configuration and the command
line options. This specification can be used to deploy a new Flink cluster.commandLine
- containing command line options relevant for the ClusterSpecificationFlinkException
- if the ClusterSpecification could not be createddefault org.apache.commons.cli.CommandLine parseCommandLineOptions(String[] args, boolean stopAtNonOptions) throws CliArgsException
CliArgsException
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.