org.apache.hadoop.yarn.api.protocolrecords
Class RegisterApplicationMasterResponse

java.lang.Object
  extended by org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract class RegisterApplicationMasterResponse
extends Object

The response sent by the ResourceManager to a new ApplicationMaster on registration.

The response contains critical details such as:

See Also:
ApplicationMasterProtocol.registerApplicationMaster(RegisterApplicationMasterRequest)

Constructor Summary
RegisterApplicationMasterResponse()
           
 
Method Summary
abstract  Map<ApplicationAccessType,String> getApplicationACLs()
          Get the ApplicationACLs for the application.
abstract  ByteBuffer getClientToAMTokenMasterKey()
          Get ClientToAMToken master key.
abstract  List<Container> getContainersFromPreviousAttempts()
           Get the list of running containers as viewed by ResourceManager from previous application attempts.
abstract  Resource getMaximumResourceCapability()
          Get the maximum capability for any Resource allocated by the ResourceManager in the cluster.
abstract  List<NMToken> getNMTokensFromPreviousAttempts()
          Get the list of NMTokens for communicating with the NMs where the containers of previous application attempts are running.
abstract  String getQueue()
          Get the queue that the application was placed in.
static RegisterApplicationMasterResponse newInstance(Resource minCapability, Resource maxCapability, Map<ApplicationAccessType,String> acls, ByteBuffer key, List<Container> containersFromPreviousAttempt, String queue, List<NMToken> nmTokensFromPreviousAttempts)
           
abstract  void setApplicationACLs(Map<ApplicationAccessType,String> acls)
          Set the ApplicationACLs for the application.
abstract  void setClientToAMTokenMasterKey(ByteBuffer key)
          Set ClientToAMToken master key.
abstract  void setContainersFromPreviousAttempts(List<Container> containersFromPreviousAttempt)
          Set the list of running containers as viewed by ResourceManager from previous application attempts.
abstract  void setMaximumResourceCapability(Resource capability)
           
abstract  void setNMTokensFromPreviousAttempts(List<NMToken> nmTokens)
          Set the list of NMTokens for communicating with the NMs where the the containers of previous application attempts are running.
abstract  void setQueue(String queue)
          Set the queue that the application was placed in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegisterApplicationMasterResponse

public RegisterApplicationMasterResponse()
Method Detail

newInstance

@InterfaceAudience.Private
@InterfaceStability.Unstable
public static RegisterApplicationMasterResponse newInstance(Resource minCapability,
                                                                                                                  Resource maxCapability,
                                                                                                                  Map<ApplicationAccessType,String> acls,
                                                                                                                  ByteBuffer key,
                                                                                                                  List<Container> containersFromPreviousAttempt,
                                                                                                                  String queue,
                                                                                                                  List<NMToken> nmTokensFromPreviousAttempts)

getMaximumResourceCapability

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract Resource getMaximumResourceCapability()
Get the maximum capability for any Resource allocated by the ResourceManager in the cluster.

Returns:
maximum capability of allocated resources in the cluster

setMaximumResourceCapability

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setMaximumResourceCapability(Resource capability)

getApplicationACLs

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract Map<ApplicationAccessType,String> getApplicationACLs()
Get the ApplicationACLs for the application.

Returns:
all the ApplicationACLs

setApplicationACLs

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setApplicationACLs(Map<ApplicationAccessType,String> acls)
Set the ApplicationACLs for the application.

Parameters:
acls -

getClientToAMTokenMasterKey

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract ByteBuffer getClientToAMTokenMasterKey()

Get ClientToAMToken master key.

The ClientToAMToken master key is sent to ApplicationMaster by ResourceManager via RegisterApplicationMasterResponse , used to verify corresponding ClientToAMToken.


setClientToAMTokenMasterKey

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract void setClientToAMTokenMasterKey(ByteBuffer key)
Set ClientToAMToken master key.


getQueue

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract String getQueue()

Get the queue that the application was placed in.


setQueue

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract void setQueue(String queue)

Set the queue that the application was placed in.


getContainersFromPreviousAttempts

@InterfaceAudience.Public
@InterfaceStability.Unstable
public abstract List<Container> getContainersFromPreviousAttempts()

Get the list of running containers as viewed by ResourceManager from previous application attempts.

Returns:
the list of running containers as viewed by ResourceManager from previous application attempts
See Also:
getNMTokensFromPreviousAttempts()

setContainersFromPreviousAttempts

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setContainersFromPreviousAttempts(List<Container> containersFromPreviousAttempt)
Set the list of running containers as viewed by ResourceManager from previous application attempts.

Parameters:
containersFromPreviousAttempt - the list of running containers as viewed by ResourceManager from previous application attempts.

getNMTokensFromPreviousAttempts

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract List<NMToken> getNMTokensFromPreviousAttempts()
Get the list of NMTokens for communicating with the NMs where the containers of previous application attempts are running.

Returns:
the list of NMTokens for communicating with the NMs where the containers of previous application attempts are running.
See Also:
getContainersFromPreviousAttempts()

setNMTokensFromPreviousAttempts

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setNMTokensFromPreviousAttempts(List<NMToken> nmTokens)
Set the list of NMTokens for communicating with the NMs where the the containers of previous application attempts are running.

Parameters:
nmTokens - the list of NMTokens for communicating with the NMs where the containers of previous application attempts are running.


Copyright © 2014 Apache Software Foundation. All Rights Reserved.