public interface CustomCommandLine<ClusterType extends ClusterClient>
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.
|
ClusterType |
createCluster(String applicationName,
org.apache.commons.cli.CommandLine commandLine,
Configuration config,
String configurationDirectory,
List<URL> userJarFiles)
Creates the client for the cluster.
|
String |
getId()
Gets the unique identifier of this CustomCommandLine.
|
boolean |
isActive(org.apache.commons.cli.CommandLine commandLine,
Configuration configuration)
Signals whether the custom command-line wants to execute or not.
|
ClusterType |
retrieveCluster(org.apache.commons.cli.CommandLine commandLine,
Configuration config,
String configurationDirectory)
Retrieves a client for a running cluster.
|
boolean isActive(org.apache.commons.cli.CommandLine commandLine, Configuration configuration)
commandLine
- The command-line optionsconfiguration
- The Flink configurationString 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.ClusterType retrieveCluster(org.apache.commons.cli.CommandLine commandLine, Configuration config, String configurationDirectory) throws UnsupportedOperationException
commandLine
- The command-line parameters from the CliFrontendconfig
- The Flink configconfigurationDirectory
- Directory for configuration filesUnsupportedOperationException
- if the operation is not supportedClusterType createCluster(String applicationName, org.apache.commons.cli.CommandLine commandLine, Configuration config, String configurationDirectory, List<URL> userJarFiles) throws Exception
applicationName
- The application name to usecommandLine
- The command-line options parsed by the CliFrontendconfig
- The Flink config to useconfigurationDirectory
- Directory for configuration filesuserJarFiles
- User jar files to include in the classpath of the cluster. @return The client to communicate with the cluster which the CustomCommandLine brought up.Exception
- if the cluster could not be createdCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.