public class Flip6DefaultCLI extends Object implements CustomCommandLine<RestClusterClient>
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.cli.Option |
FLIP_6 |
Constructor and Description |
---|
Flip6DefaultCLI() |
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.
|
RestClusterClient |
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.
|
RestClusterClient |
retrieveCluster(org.apache.commons.cli.CommandLine commandLine,
Configuration config,
String configurationDirectory)
Retrieves a client for a running cluster.
|
public boolean isActive(org.apache.commons.cli.CommandLine commandLine, Configuration configuration)
CustomCommandLine
isActive
in interface CustomCommandLine<RestClusterClient>
commandLine
- The command-line optionsconfiguration
- The Flink configurationpublic String getId()
CustomCommandLine
getId
in interface CustomCommandLine<RestClusterClient>
public void addRunOptions(org.apache.commons.cli.Options baseOptions)
CustomCommandLine
addRunOptions
in interface CustomCommandLine<RestClusterClient>
baseOptions
- The existing options.public void addGeneralOptions(org.apache.commons.cli.Options baseOptions)
CustomCommandLine
addGeneralOptions
in interface CustomCommandLine<RestClusterClient>
baseOptions
- The existing options.public RestClusterClient retrieveCluster(org.apache.commons.cli.CommandLine commandLine, Configuration config, String configurationDirectory)
CustomCommandLine
retrieveCluster
in interface CustomCommandLine<RestClusterClient>
commandLine
- The command-line parameters from the CliFrontendconfig
- The Flink configconfigurationDirectory
- Directory for configuration filespublic RestClusterClient createCluster(String applicationName, org.apache.commons.cli.CommandLine commandLine, Configuration config, String configurationDirectory, List<URL> userJarFiles) throws UnsupportedOperationException
CustomCommandLine
createCluster
in interface CustomCommandLine<RestClusterClient>
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.UnsupportedOperationException
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.