public class CliFrontend extends Object
Constructor and Description |
---|
CliFrontend(Configuration configuration,
ClusterClientServiceLoader clusterClientServiceLoader,
List<CustomCommandLine> customCommandLines) |
CliFrontend(Configuration configuration,
List<CustomCommandLine> customCommandLines) |
Modifier and Type | Method and Description |
---|---|
protected void |
cancel(String[] args)
Executes the CANCEL action.
|
protected void |
executeProgram(Configuration configuration,
PackagedProgram program) |
org.apache.commons.cli.CommandLine |
getCommandLine(org.apache.commons.cli.Options commandOptions,
String[] args,
boolean stopAtNonOptions) |
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.
|
int |
parseAndRun(String[] args)
Parses the command line arguments and starts the requested action.
|
protected void |
run(String[] args)
Executions the run action.
|
protected void |
runApplication(String[] args) |
protected void |
savepoint(String[] args)
Executes the SAVEPOINT action.
|
protected void |
stop(String[] args)
Executes the STOP action.
|
CustomCommandLine |
validateAndGetActiveCommandLine(org.apache.commons.cli.CommandLine commandLine)
Gets the custom command-line for the arguments.
|
public CliFrontend(Configuration configuration, List<CustomCommandLine> customCommandLines)
public CliFrontend(Configuration configuration, ClusterClientServiceLoader clusterClientServiceLoader, List<CustomCommandLine> customCommandLines)
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 Exception
args
- Command line arguments for the info action.Exception
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
public org.apache.commons.cli.CommandLine getCommandLine(org.apache.commons.cli.Options commandOptions, String[] args, boolean stopAtNonOptions) throws CliArgsException
CliArgsException
protected void savepoint(String[] args) throws Exception
args
- Command line arguments for the savepoint action.Exception
protected void executeProgram(Configuration configuration, PackagedProgram program) throws ProgramInvocationException
ProgramInvocationException
public int parseAndRun(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 validateAndGetActiveCommandLine(org.apache.commons.cli.CommandLine commandLine)
commandLine
- The input to the command-line.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.