org.apache.hadoop.yarn.api.records.impl.pb
Class ApplicationSubmissionContextPBImpl

java.lang.Object
  extended by org.apache.hadoop.yarn.api.records.ProtoBase<YarnProtos.ApplicationSubmissionContextProto>
      extended by org.apache.hadoop.yarn.api.records.impl.pb.ApplicationSubmissionContextPBImpl
All Implemented Interfaces:
ApplicationSubmissionContext

public class ApplicationSubmissionContextPBImpl
extends ProtoBase<YarnProtos.ApplicationSubmissionContextProto>
implements ApplicationSubmissionContext


Constructor Summary
ApplicationSubmissionContextPBImpl()
           
ApplicationSubmissionContextPBImpl(YarnProtos.ApplicationSubmissionContextProto proto)
           
 
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.
 YarnProtos.ApplicationSubmissionContextProto getProto()
           
 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 applicationId)
          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.
 
Methods inherited from class org.apache.hadoop.yarn.api.records.ProtoBase
convertFromProtoFormat, convertToProtoFormat, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplicationSubmissionContextPBImpl

public ApplicationSubmissionContextPBImpl()

ApplicationSubmissionContextPBImpl

public ApplicationSubmissionContextPBImpl(YarnProtos.ApplicationSubmissionContextProto proto)
Method Detail

getProto

public YarnProtos.ApplicationSubmissionContextProto getProto()
Specified by:
getProto in class ProtoBase<YarnProtos.ApplicationSubmissionContextProto>

getPriority

public Priority getPriority()
Description copied from interface: ApplicationSubmissionContext
Get the Priority of the application.

Specified by:
getPriority in interface ApplicationSubmissionContext
Returns:
Priority of the application

setPriority

public void setPriority(Priority priority)
Description copied from interface: ApplicationSubmissionContext
Set the Priority of the application.

Specified by:
setPriority in interface ApplicationSubmissionContext
Parameters:
priority - Priority of the application

getApplicationId

public ApplicationId getApplicationId()
Description copied from interface: ApplicationSubmissionContext
Get the ApplicationId of the submitted application.

Specified by:
getApplicationId in interface ApplicationSubmissionContext
Returns:
ApplicationId of the submitted application

setApplicationId

public void setApplicationId(ApplicationId applicationId)
Description copied from interface: ApplicationSubmissionContext
Set the ApplicationId of the submitted application.

Specified by:
setApplicationId in interface ApplicationSubmissionContext
Parameters:
applicationId - ApplicationId of the submitted application

getApplicationName

public String getApplicationName()
Description copied from interface: ApplicationSubmissionContext
Get the application name.

Specified by:
getApplicationName in interface ApplicationSubmissionContext
Returns:
application name

setApplicationName

public void setApplicationName(String applicationName)
Description copied from interface: ApplicationSubmissionContext
Set the application name.

Specified by:
setApplicationName in interface ApplicationSubmissionContext
Parameters:
applicationName - application name

getQueue

public String getQueue()
Description copied from interface: ApplicationSubmissionContext
Get the queue to which the application is being submitted.

Specified by:
getQueue in interface ApplicationSubmissionContext
Returns:
queue to which the application is being submitted

setQueue

public void setQueue(String queue)
Description copied from interface: ApplicationSubmissionContext
Set the queue to which the application is being submitted

Specified by:
setQueue in interface ApplicationSubmissionContext
Parameters:
queue - queue to which the application is being submitted

getUser

public String getUser()
Description copied from interface: ApplicationSubmissionContext
Get the user submitting the application.

Specified by:
getUser in interface ApplicationSubmissionContext
Returns:
user submitting the application

setUser

public void setUser(String user)
Description copied from interface: ApplicationSubmissionContext
Set the user submitting the application.

Specified by:
setUser in interface ApplicationSubmissionContext
Parameters:
user - user submitting the application

getAMContainerSpec

public ContainerLaunchContext getAMContainerSpec()
Description copied from interface: ApplicationSubmissionContext
Get the ContainerLaunchContext to describe the Container with which the ApplicationMaster is launched.

Specified by:
getAMContainerSpec in interface ApplicationSubmissionContext
Returns:
ContainerLaunchContext for the ApplicationMaster container

setAMContainerSpec

public void setAMContainerSpec(ContainerLaunchContext amContainer)
Description copied from interface: ApplicationSubmissionContext
Set the ContainerLaunchContext to describe the Container with which the ApplicationMaster is launched.

Specified by:
setAMContainerSpec in interface ApplicationSubmissionContext
Parameters:
amContainer - ContainerLaunchContext for the ApplicationMaster container

getCancelTokensWhenComplete

public boolean getCancelTokensWhenComplete()
Specified by:
getCancelTokensWhenComplete in interface ApplicationSubmissionContext
Returns:
true if tokens should be canceled when the app completes.

setCancelTokensWhenComplete

public void setCancelTokensWhenComplete(boolean cancel)
Description copied from interface: ApplicationSubmissionContext
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.

Specified by:
setCancelTokensWhenComplete in interface ApplicationSubmissionContext
Parameters:
cancel - true if tokens should be canceled when the app finishes.


Copyright © 2012 Apache Software Foundation. All Rights Reserved.