public class CommandLineClientRunner extends AbstractCommandLineRunner<YarnClient>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ARG_APPLICATION_ID |
static java.lang.String |
OPT_KILL |
static java.lang.String |
OPT_LIST |
static java.lang.String |
OPT_SUBMIT |
Constructor and Description |
---|
CommandLineClientRunner() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getDefaultBeanIdentifier()
Gets a default bean id which is used to resolve
the instance from an Application Context.
|
protected java.util.List<java.lang.String> |
getValidOpts()
Gets the list of valid option arguments.
|
protected ExitStatus |
handleBeanRun(YarnClient bean,
java.lang.String[] parameters,
java.util.Set<java.lang.String> opts)
Handles the execution of a bean after Application Context(s) has
been initialized.
|
static void |
main(java.lang.String[] args) |
protected org.apache.hadoop.yarn.api.records.ApplicationId |
queryApplicationId(YarnClient client,
java.lang.String applicationId)
Query application id.
|
doMain, exit, getApplicationContext, getChildApplicationContext, getChildContextConfigPath, getContextConfigPath, getErrorMessage, presetSystemExiter, start
public static final java.lang.String OPT_SUBMIT
public static final java.lang.String OPT_KILL
public static final java.lang.String OPT_LIST
public static final java.lang.String ARG_APPLICATION_ID
protected ExitStatus handleBeanRun(YarnClient bean, java.lang.String[] parameters, java.util.Set<java.lang.String> opts)
AbstractCommandLineRunner
It is implementors responsibility to decide what to do with the given bean since this class only knows the typed bean instance.
handleBeanRun
in class AbstractCommandLineRunner<YarnClient>
bean
- the bean instanceparameters
- the parametersopts
- the optionsprotected java.lang.String getDefaultBeanIdentifier()
AbstractCommandLineRunner
getDefaultBeanIdentifier
in class AbstractCommandLineRunner<YarnClient>
protected java.util.List<java.lang.String> getValidOpts()
AbstractCommandLineRunner
When overriding valid options make sure that options doesn't match anything else planned to be used in a command line. i.e. usually it's advised to prefix options with '-' character.
getValidOpts
in class AbstractCommandLineRunner<YarnClient>
protected org.apache.hadoop.yarn.api.records.ApplicationId queryApplicationId(YarnClient client, java.lang.String applicationId)
client
- the yarn clientapplicationId
- the application idpublic static void main(java.lang.String[] args)