public class DefaultCLI extends Object implements CustomCommandLine<StandaloneClusterClient>
Constructor and Description |
---|
DefaultCLI() |
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.
|
StandaloneClusterClient |
createCluster(String applicationName,
org.apache.commons.cli.CommandLine commandLine,
Configuration config,
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
|
StandaloneClusterClient |
retrieveCluster(org.apache.commons.cli.CommandLine commandLine,
Configuration config)
Retrieves a client for a running cluster
|
public boolean isActive(org.apache.commons.cli.CommandLine commandLine, Configuration configuration)
CustomCommandLine
isActive
in interface CustomCommandLine<StandaloneClusterClient>
commandLine
- The command-line optionsconfiguration
- The Flink configurationpublic String getId()
CustomCommandLine
getId
in interface CustomCommandLine<StandaloneClusterClient>
public void addRunOptions(org.apache.commons.cli.Options baseOptions)
CustomCommandLine
addRunOptions
in interface CustomCommandLine<StandaloneClusterClient>
baseOptions
- The existing options.public void addGeneralOptions(org.apache.commons.cli.Options baseOptions)
CustomCommandLine
addGeneralOptions
in interface CustomCommandLine<StandaloneClusterClient>
baseOptions
- The existing options.public StandaloneClusterClient retrieveCluster(org.apache.commons.cli.CommandLine commandLine, Configuration config)
CustomCommandLine
retrieveCluster
in interface CustomCommandLine<StandaloneClusterClient>
commandLine
- The command-line parameters from the CliFrontendconfig
- The Flink configpublic StandaloneClusterClient createCluster(String applicationName, org.apache.commons.cli.CommandLine commandLine, Configuration config, List<URL> userJarFiles) throws UnsupportedOperationException
CustomCommandLine
createCluster
in interface CustomCommandLine<StandaloneClusterClient>
applicationName
- The application name to usecommandLine
- The command-line options parsed by the CliFrontendconfig
- The Flink config to useuserJarFiles
- User jar files to include in the classpath of the cluster.UnsupportedOperationException
- if the operation is not supportedCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.