@InterfaceAudience.Public @InterfaceStability.Stable public abstract class ApplicationSubmissionContext extends Object
ApplicationSubmissionContext represents all of the
information needed by the ResourceManager to launch
the ApplicationMaster for an application.
It includes details such as:
ApplicationId of the application.Priority of the application.ContainerLaunchContext of the container in which the
ApplicationMaster is executed.
| Constructor and Description |
|---|
ApplicationSubmissionContext() |
| Modifier and Type | Method and Description |
|---|---|
abstract ContainerLaunchContext |
getAMContainerSpec()
Get the
ContainerLaunchContext to describe the
Container with which the ApplicationMaster is
launched. |
abstract ApplicationId |
getApplicationId()
Get the
ApplicationId of the submitted application. |
abstract String |
getApplicationName()
Get the application name.
|
abstract String |
getApplicationType()
Get the application type
|
abstract boolean |
getCancelTokensWhenComplete() |
abstract int |
getMaxAppAttempts() |
abstract Priority |
getPriority()
Get the
Priority of the application. |
abstract String |
getQueue()
Get the queue to which the application is being submitted.
|
abstract Resource |
getResource()
Get the resource required by the
ApplicationMaster for this
application. |
abstract boolean |
getUnmanagedAM()
Get if the RM should manage the execution of the AM.
|
static ApplicationSubmissionContext |
newInstance(ApplicationId applicationId,
String applicationName,
String queue,
Priority priority,
ContainerLaunchContext amContainer,
boolean isUnmanagedAM,
boolean cancelTokensWhenComplete,
int maxAppAttempts,
Resource resource) |
static ApplicationSubmissionContext |
newInstance(ApplicationId applicationId,
String applicationName,
String queue,
Priority priority,
ContainerLaunchContext amContainer,
boolean isUnmanagedAM,
boolean cancelTokensWhenComplete,
int maxAppAttempts,
Resource resource,
String applicationType) |
abstract void |
setAMContainerSpec(ContainerLaunchContext amContainer)
Set the
ContainerLaunchContext to describe the
Container with which the ApplicationMaster is
launched. |
abstract void |
setApplicationId(ApplicationId applicationId)
Set the
ApplicationId of the submitted application. |
abstract void |
setApplicationName(String applicationName)
Set the application name.
|
abstract void |
setApplicationType(String applicationType)
Set the application type
|
abstract void |
setCancelTokensWhenComplete(boolean cancel)
Set to false if tokens should not be canceled when the app finished else
false.
|
abstract void |
setMaxAppAttempts(int maxAppAttempts)
Set the number of max attempts of the application to be submitted.
|
abstract void |
setPriority(Priority priority)
Set the
Priority of the application. |
abstract void |
setQueue(String queue)
Set the queue to which the application is being submitted
|
abstract void |
setResource(Resource resource)
Set the resource required by the
ApplicationMaster for this
application. |
abstract void |
setUnmanagedAM(boolean value) |
@InterfaceAudience.Public @InterfaceStability.Stable public static ApplicationSubmissionContext newInstance(ApplicationId applicationId, String applicationName, String queue, Priority priority, ContainerLaunchContext amContainer, boolean isUnmanagedAM, boolean cancelTokensWhenComplete, int maxAppAttempts, Resource resource, String applicationType)
@InterfaceAudience.Public @InterfaceStability.Stable public static ApplicationSubmissionContext newInstance(ApplicationId applicationId, String applicationName, String queue, Priority priority, ContainerLaunchContext amContainer, boolean isUnmanagedAM, boolean cancelTokensWhenComplete, int maxAppAttempts, Resource resource)
@InterfaceAudience.Public @InterfaceStability.Stable public abstract ApplicationId getApplicationId()
ApplicationId of the submitted application.ApplicationId of the submitted application@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setApplicationId(ApplicationId applicationId)
ApplicationId of the submitted application.applicationId - ApplicationId of the submitted
application@InterfaceAudience.Public @InterfaceStability.Stable public abstract String getApplicationName()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setApplicationName(String applicationName)
applicationName - application name@InterfaceAudience.Public @InterfaceStability.Stable public abstract String getQueue()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setQueue(String queue)
queue - queue to which the application is being submitted@InterfaceAudience.Public @InterfaceStability.Stable public abstract Priority getPriority()
Priority of the application.Priority of the application@InterfaceAudience.Private @InterfaceStability.Unstable public abstract void setPriority(Priority priority)
Priority of the application.priority - Priority of the application@InterfaceAudience.Public @InterfaceStability.Stable public abstract ContainerLaunchContext getAMContainerSpec()
ContainerLaunchContext to describe the
Container with which the ApplicationMaster is
launched.ContainerLaunchContext for the
ApplicationMaster container@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setAMContainerSpec(ContainerLaunchContext amContainer)
ContainerLaunchContext to describe the
Container with which the ApplicationMaster is
launched.amContainer - ContainerLaunchContext for the
ApplicationMaster container@InterfaceAudience.Public @InterfaceStability.Stable public abstract boolean getUnmanagedAM()
YarnApplicationState.
Such apps will not be retried by the RM on app attempt failure.
The default value is false.@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setUnmanagedAM(boolean value)
value - true if RM should not manage the AM@InterfaceAudience.LimitedPrivate(value="mapreduce") @InterfaceStability.Unstable public abstract boolean getCancelTokensWhenComplete()
@InterfaceAudience.LimitedPrivate(value="mapreduce") @InterfaceStability.Unstable public abstract void setCancelTokensWhenComplete(boolean cancel)
cancel - true if tokens should be canceled when the app finishes.@InterfaceAudience.Public @InterfaceStability.Stable public abstract int getMaxAppAttempts()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setMaxAppAttempts(int maxAppAttempts)
maxAppAttempts - the number of max attempts of the application
to be submitted.@InterfaceAudience.Public @InterfaceStability.Stable public abstract Resource getResource()
ApplicationMaster for this
application.ApplicationMaster for
this application.@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setResource(Resource resource)
ApplicationMaster for this
application.resource - the resource required by the ApplicationMaster
for this application.@InterfaceAudience.Public @InterfaceStability.Stable public abstract String getApplicationType()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setApplicationType(String applicationType)
applicationType - the application typeCopyright © 2013 Apache Software Foundation. All rights reserved.