public class DefaultCLI extends AbstractCustomCommandLine<StandaloneClusterId>
addressOption, configuration, zookeeperNamespaceOption| Constructor and Description |
|---|
DefaultCLI(org.apache.flink.configuration.Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGeneralOptions(org.apache.commons.cli.Options baseOptions)
Adds custom options to the existing general options.
|
StandaloneClusterDescriptor |
createClusterDescriptor(org.apache.commons.cli.CommandLine commandLine)
Create a
ClusterDescriptor from the given configuration, configuration directory
and the command line. |
StandaloneClusterId |
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.
|
addRunOptions, applyCommandLineOptionsToConfiguration, getConfigurationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitparseCommandLineOptionspublic DefaultCLI(org.apache.flink.configuration.Configuration configuration)
public boolean isActive(org.apache.commons.cli.CommandLine commandLine)
CustomCommandLinecommandLine - The command-line optionspublic String getId()
CustomCommandLinepublic void addGeneralOptions(org.apache.commons.cli.Options baseOptions)
CustomCommandLineaddGeneralOptions in interface CustomCommandLine<StandaloneClusterId>addGeneralOptions in class AbstractCustomCommandLine<StandaloneClusterId>baseOptions - The existing options.public StandaloneClusterDescriptor createClusterDescriptor(org.apache.commons.cli.CommandLine commandLine) throws org.apache.flink.util.FlinkException
CustomCommandLineClusterDescriptor from the given configuration, configuration directory
and the command line.commandLine - containing command line options relevant for the ClusterDescriptororg.apache.flink.util.FlinkException - if the ClusterDescriptor could not be created@Nullable public StandaloneClusterId getClusterId(org.apache.commons.cli.CommandLine commandLine)
CustomCommandLineA 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 retrievalpublic ClusterSpecification getClusterSpecification(org.apache.commons.cli.CommandLine commandLine)
CustomCommandLineClusterSpecification 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 ClusterSpecificationCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.