org.apache.hadoop.yarn.api.records
Interface ApplicationSubmissionContext

All Known Implementing Classes:
ApplicationSubmissionContextPBImpl

@InterfaceAudience.Public
@InterfaceStability.Stable
public interface ApplicationSubmissionContext

ApplicationSubmissionContext represents all of the information needed by the ResourceManager to launch the ApplicationMaster for an application.

It includes details such as:

See Also:
ContainerLaunchContext, ClientRMProtocol.submitApplication(org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationRequest)

Method Summary
 ContainerLaunchContext getAMContainerSpec()
          Get the ContainerLaunchContext to describe the Container with which the ApplicationMaster is launched.
 ApplicationId getApplicationId()
          Get the ApplicationId of the submitted application.
 String getApplicationName()
          Get the application name.
 boolean getCancelTokensWhenComplete()
           
 Priority getPriority()
          Get the Priority of the application.
 String getQueue()
          Get the queue to which the application is being submitted.
 String getUser()
          Get the user submitting the application.
 void setAMContainerSpec(ContainerLaunchContext amContainer)
          Set the ContainerLaunchContext to describe the Container with which the ApplicationMaster is launched.
 void setApplicationId(ApplicationId appplicationId)
          Set the ApplicationId of the submitted application.
 void setApplicationName(String applicationName)
          Set the application name.
 void setCancelTokensWhenComplete(boolean cancel)
          Set to false if tokens should not be canceled when the app finished else false.
 void setPriority(Priority priority)
          Set the Priority of the application.
 void setQueue(String queue)
          Set the queue to which the application is being submitted
 void setUser(String user)
          Set the user submitting the application.
 

Method Detail

getApplicationId

@InterfaceAudience.Public
@InterfaceStability.Stable
ApplicationId getApplicationId()
Get the ApplicationId of the submitted application.

Returns:
ApplicationId of the submitted application

setApplicationId

@InterfaceAudience.Public
@InterfaceStability.Stable
void setApplicationId(ApplicationId appplicationId)
Set the ApplicationId of the submitted application.

Parameters:
appplicationId - ApplicationId of the submitted application

getApplicationName

@InterfaceAudience.Public
@InterfaceStability.Stable
String getApplicationName()
Get the application name.

Returns:
application name

setApplicationName

@InterfaceAudience.Public
@InterfaceStability.Stable
void setApplicationName(String applicationName)
Set the application name.

Parameters:
applicationName - application name

getQueue

@InterfaceAudience.Public
@InterfaceStability.Stable
String getQueue()
Get the queue to which the application is being submitted.

Returns:
queue to which the application is being submitted

setQueue

@InterfaceAudience.Public
@InterfaceStability.Stable
void setQueue(String queue)
Set the queue to which the application is being submitted

Parameters:
queue - queue to which the application is being submitted

getPriority

@InterfaceAudience.Public
@InterfaceStability.Stable
Priority getPriority()
Get the Priority of the application.

Returns:
Priority of the application

setPriority

@InterfaceAudience.Public
@InterfaceStability.Stable
void setPriority(Priority priority)
Set the Priority of the application.

Parameters:
priority - Priority of the application

getUser

@InterfaceAudience.Public
@InterfaceStability.Stable
String getUser()
Get the user submitting the application.

Returns:
user submitting the application

setUser

@InterfaceAudience.Public
@InterfaceStability.Stable
void setUser(String user)
Set the user submitting the application.

Parameters:
user - user submitting the application

getAMContainerSpec

@InterfaceAudience.Public
@InterfaceStability.Stable
ContainerLaunchContext getAMContainerSpec()
Get the ContainerLaunchContext to describe the Container with which the ApplicationMaster is launched.

Returns:
ContainerLaunchContext for the ApplicationMaster container

setAMContainerSpec

@InterfaceAudience.Public
@InterfaceStability.Stable
void setAMContainerSpec(ContainerLaunchContext amContainer)
Set the ContainerLaunchContext to describe the Container with which the ApplicationMaster is launched.

Parameters:
amContainer - ContainerLaunchContext for the ApplicationMaster container

getCancelTokensWhenComplete

@InterfaceAudience.LimitedPrivate(value="mapreduce")
@InterfaceStability.Unstable
boolean getCancelTokensWhenComplete()
Returns:
true if tokens should be canceled when the app completes.

setCancelTokensWhenComplete

@InterfaceAudience.LimitedPrivate(value="mapreduce")
@InterfaceStability.Unstable
void setCancelTokensWhenComplete(boolean cancel)
Set to false if tokens should not be canceled when the app finished else false. WARNING: this is not recommended unless you want your single job tokens to be reused by others jobs.

Parameters:
cancel - true if tokens should be canceled when the app finishes.


Copyright © 2012 Apache Software Foundation. All Rights Reserved.