@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.
LogAggregationContext
Constructor and Description |
---|
ApplicationSubmissionContext() |
Modifier and Type | Method and Description |
---|---|
abstract ResourceRequest |
getAMContainerResourceRequest()
Get ResourceRequest of AM container, if this is not null, scheduler will
use this to acquire resource for AM container.
|
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 Set<String> |
getApplicationTags()
Get tags for the application
|
abstract String |
getApplicationType()
Get the application type
|
abstract long |
getAttemptFailuresValidityInterval()
Get the attemptFailuresValidityInterval in milliseconds for the application
|
abstract boolean |
getKeepContainersAcrossApplicationAttempts()
Get the flag which indicates whether to keep containers across application
attempts or not.
|
abstract LogAggregationContext |
getLogAggregationContext()
Get
LogAggregationContext of the application |
abstract int |
getMaxAppAttempts() |
abstract String |
getNodeLabelExpression()
Get node-label-expression for this app.
|
abstract Priority |
getPriority()
Get the
Priority of the application. |
abstract String |
getQueue()
Get the queue to which the application is being submitted.
|
abstract ReservationId |
getReservationID()
Get the reservation id, that corresponds to a valid resource allocation in
the scheduler (between start and end time of the corresponding reservation)
|
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,
ContainerLaunchContext amContainer,
boolean isUnmanagedAM,
boolean cancelTokensWhenComplete,
int maxAppAttempts,
String applicationType,
boolean keepContainers,
String appLabelExpression,
ResourceRequest resourceRequest) |
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) |
static ApplicationSubmissionContext |
newInstance(ApplicationId applicationId,
String applicationName,
String queue,
Priority priority,
ContainerLaunchContext amContainer,
boolean isUnmanagedAM,
boolean cancelTokensWhenComplete,
int maxAppAttempts,
Resource resource,
String applicationType,
boolean keepContainers) |
static ApplicationSubmissionContext |
newInstance(ApplicationId applicationId,
String applicationName,
String queue,
Priority priority,
ContainerLaunchContext amContainer,
boolean isUnmanagedAM,
boolean cancelTokensWhenComplete,
int maxAppAttempts,
Resource resource,
String applicationType,
boolean keepContainers,
LogAggregationContext logAggregationContext) |
static ApplicationSubmissionContext |
newInstance(ApplicationId applicationId,
String applicationName,
String queue,
Priority priority,
ContainerLaunchContext amContainer,
boolean isUnmanagedAM,
boolean cancelTokensWhenComplete,
int maxAppAttempts,
Resource resource,
String applicationType,
boolean keepContainers,
long attemptFailuresValidityInterval) |
static ApplicationSubmissionContext |
newInstance(ApplicationId applicationId,
String applicationName,
String queue,
Priority priority,
ContainerLaunchContext amContainer,
boolean isUnmanagedAM,
boolean cancelTokensWhenComplete,
int maxAppAttempts,
Resource resource,
String applicationType,
boolean keepContainers,
String appLabelExpression,
String amContainerLabelExpression) |
abstract void |
setAMContainerResourceRequest(ResourceRequest request)
Set ResourceRequest of AM container
|
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 |
setApplicationTags(Set<String> tags)
Set tags for the application.
|
abstract void |
setApplicationType(String applicationType)
Set the application type
|
abstract void |
setAttemptFailuresValidityInterval(long attemptFailuresValidityInterval)
Set the attemptFailuresValidityInterval in milliseconds for the application
|
abstract void |
setKeepContainersAcrossApplicationAttempts(boolean keepContainers)
Set the flag which indicates whether to keep containers across application
attempts.
|
abstract void |
setLogAggregationContext(LogAggregationContext logAggregationContext)
Set
LogAggregationContext for the application |
abstract void |
setMaxAppAttempts(int maxAppAttempts)
Set the number of max attempts of the application to be submitted.
|
abstract void |
setNodeLabelExpression(String nodeLabelExpression)
Set node-label-expression for this app
|
abstract void |
setQueue(String queue)
Set the queue to which the application is being submitted
|
abstract void |
setReservationID(ReservationId reservationID)
Set the reservation id, that correspond to a valid resource allocation in
the scheduler (between start and end time of the corresponding reservation)
|
abstract void |
setResource(Resource resource)
Set the resource required by the
ApplicationMaster for this
application. |
abstract void |
setUnmanagedAM(boolean value) |
public ApplicationSubmissionContext()
@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, boolean keepContainers, String appLabelExpression, String amContainerLabelExpression)
public static ApplicationSubmissionContext newInstance(ApplicationId applicationId, String applicationName, String queue, Priority priority, ContainerLaunchContext amContainer, boolean isUnmanagedAM, boolean cancelTokensWhenComplete, int maxAppAttempts, Resource resource, String applicationType, boolean keepContainers)
@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 static ApplicationSubmissionContext newInstance(ApplicationId applicationId, String applicationName, String queue, ContainerLaunchContext amContainer, boolean isUnmanagedAM, boolean cancelTokensWhenComplete, int maxAppAttempts, String applicationType, boolean keepContainers, String appLabelExpression, ResourceRequest resourceRequest)
@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, boolean keepContainers, long attemptFailuresValidityInterval)
@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, boolean keepContainers, LogAggregationContext logAggregationContext)
@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.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.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 public abstract Resource getResource()
ApplicationMaster
for this
application. Please note this will be DEPRECATED, use getResource
in getAMContainerResourceRequest instead.ApplicationMaster
for
this application.@InterfaceAudience.Public 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 type@InterfaceAudience.Public @InterfaceStability.Stable public abstract boolean getKeepContainersAcrossApplicationAttempts()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setKeepContainersAcrossApplicationAttempts(boolean keepContainers)
If the flag is true, running containers will not be killed when application
attempt fails and these containers will be retrieved by the new application
attempt on registration via
ApplicationMasterProtocol.registerApplicationMaster(RegisterApplicationMasterRequest)
.
keepContainers
- the flag which indicates whether to keep containers across
application attempts.@InterfaceAudience.Public @InterfaceStability.Stable public abstract Set<String> getApplicationTags()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setApplicationTags(Set<String> tags)
YarnConfiguration.APPLICATION_MAX_TAGS
are allowed
per application. Each tag can be at most
YarnConfiguration.APPLICATION_MAX_TAG_LENGTH
characters, and can contain only ASCII characters.tags
- tags to set@InterfaceAudience.Public @InterfaceStability.Evolving public abstract String getNodeLabelExpression()
@InterfaceAudience.Public @InterfaceStability.Evolving public abstract void setNodeLabelExpression(String nodeLabelExpression)
nodeLabelExpression
- node-label-expression of this app@InterfaceAudience.Public @InterfaceStability.Evolving public abstract ResourceRequest getAMContainerResourceRequest()
@InterfaceAudience.Public @InterfaceStability.Evolving public abstract void setAMContainerResourceRequest(ResourceRequest request)
request
- of AM container@InterfaceAudience.Public @InterfaceStability.Stable public abstract long getAttemptFailuresValidityInterval()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setAttemptFailuresValidityInterval(long attemptFailuresValidityInterval)
attemptFailuresValidityInterval
- @InterfaceAudience.Public @InterfaceStability.Stable public abstract LogAggregationContext getLogAggregationContext()
LogAggregationContext
of the applicationLogAggregationContext
of the application@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setLogAggregationContext(LogAggregationContext logAggregationContext)
LogAggregationContext
for the applicationlogAggregationContext
- for the application@InterfaceAudience.Public @InterfaceStability.Unstable public abstract ReservationId getReservationID()
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract void setReservationID(ReservationId reservationID)
reservationID
- representing the unique id of the
corresponding reserved resource allocation in the schedulerCopyright © 2016 Apache Software Foundation. All Rights Reserved.