public class CliFrontend extends Object
Constructor and Description |
---|
CliFrontend(Configuration configuration,
List<CustomCommandLine<?>> customCommandLines) |
Modifier and Type | Method and Description |
---|---|
protected void |
cancel(String[] args)
Executes the CANCEL action.
|
protected void |
executeProgram(PackagedProgram program,
ClusterClient<?> client,
int parallelism) |
CustomCommandLine<?> |
getActiveCustomCommandLine(org.apache.commons.cli.CommandLine commandLine)
Gets the custom command-line for the arguments.
|
Configuration |
getConfiguration()
Getter which returns a copy of the associated configuration.
|
static String |
getConfigurationDirectoryFromEnv() |
org.apache.commons.cli.Options |
getCustomCommandLineOptions() |
protected void |
info(String[] args)
Executes the info action.
|
protected void |
list(String[] args)
Executes the list action.
|
static List<CustomCommandLine<?>> |
loadCustomCommandLines(Configuration configuration,
String configurationDirectory) |
static void |
main(String[] args)
Submits the job based on the arguments.
|
protected void |
modify(String[] args) |
int |
parseParameters(String[] args)
Parses the command line arguments and starts the requested action.
|
protected void |
run(String[] args)
Executions the run action.
|
protected void |
savepoint(String[] args)
Executes the SAVEPOINT action.
|
protected void |
stop(String[] args)
Executes the STOP action.
|
public CliFrontend(Configuration configuration, List<CustomCommandLine<?>> customCommandLines) throws Exception
Exception
public Configuration getConfiguration()
public org.apache.commons.cli.Options getCustomCommandLineOptions()
protected void run(String[] args) throws Exception
args
- Command line arguments for the run action.Exception
protected void info(String[] args) throws CliArgsException, FileNotFoundException, ProgramInvocationException
args
- Command line arguments for the info action.CliArgsException
FileNotFoundException
ProgramInvocationException
protected void list(String[] args) throws Exception
args
- Command line arguments for the list action.Exception
protected void stop(String[] args) throws Exception
args
- Command line arguments for the stop action.Exception
protected void cancel(String[] args) throws Exception
args
- Command line arguments for the cancel action.Exception
protected void savepoint(String[] args) throws Exception
args
- Command line arguments for the savepoint action.Exception
protected void modify(String[] args) throws CliArgsException, FlinkException
CliArgsException
FlinkException
protected void executeProgram(PackagedProgram program, ClusterClient<?> client, int parallelism) throws ProgramMissingJobException, ProgramInvocationException
public int parseParameters(String[] args)
args
- command line arguments of the client.public static void main(String[] args)
public static String getConfigurationDirectoryFromEnv()
public static List<CustomCommandLine<?>> loadCustomCommandLines(Configuration configuration, String configurationDirectory)
public CustomCommandLine<?> getActiveCustomCommandLine(org.apache.commons.cli.CommandLine commandLine)
commandLine
- The input to the command-line.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.