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)
CustomCommandLineisActive in interface CustomCommandLine<StandaloneClusterClient>commandLine - The command-line optionsconfiguration - The Flink configurationpublic String getId()
CustomCommandLinegetId in interface CustomCommandLine<StandaloneClusterClient>public void addRunOptions(org.apache.commons.cli.Options baseOptions)
CustomCommandLineaddRunOptions in interface CustomCommandLine<StandaloneClusterClient>baseOptions - The existing options.public void addGeneralOptions(org.apache.commons.cli.Options baseOptions)
CustomCommandLineaddGeneralOptions in interface CustomCommandLine<StandaloneClusterClient>baseOptions - The existing options.public StandaloneClusterClient retrieveCluster(org.apache.commons.cli.CommandLine commandLine, Configuration config)
CustomCommandLineretrieveCluster 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
CustomCommandLinecreateCluster 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.