Class RegisterApplicationMasterResponse

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

@Public @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:

  • Maximum capability for allocated resources in the cluster.
  • ApplicationACLs for the application.
  • ClientToAMToken master key.
See Also:
  • Constructor Details

    • RegisterApplicationMasterResponse

      public RegisterApplicationMasterResponse()
  • Method Details

    • newInstance

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

      @Public @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

      @Private @Unstable public abstract void setMaximumResourceCapability(Resource capability)
    • getApplicationACLs

      @Public @Stable public abstract Map<ApplicationAccessType,String> getApplicationACLs()
      Get the ApplicationACLs for the application.
      Returns:
      all the ApplicationACLs
    • setApplicationACLs

      @Private @Unstable public abstract void setApplicationACLs(Map<ApplicationAccessType,String> acls)
      Set the ApplicationACLs for the application.
      Parameters:
      acls - ApplicationACLs for the application.
    • getClientToAMTokenMasterKey

      @Public @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.

      Returns:
      ClientToAMToken master key
    • setClientToAMTokenMasterKey

      @Public @Stable public abstract void setClientToAMTokenMasterKey(ByteBuffer key)
      Set ClientToAMToken master key.
      Parameters:
      key - ClientToAMToken master key.
    • getQueue

      @Public @Stable public abstract String getQueue()

      Get the queue that the application was placed in.

      Returns:
      the queue that the application was placed in.
    • setQueue

      @Public @Stable public abstract void setQueue(String queue)

      Set the queue that the application was placed in.

      Parameters:
      queue - queue.
    • getContainersFromPreviousAttempts

      @Public @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:
    • setContainersFromPreviousAttempts

      @Private @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

      @Public @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:
    • setNMTokensFromPreviousAttempts

      @Private @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.
    • getSchedulerResourceTypes

      @Public @Unstable public abstract EnumSet<org.apache.hadoop.yarn.proto.YarnServiceProtos.SchedulerResourceTypes> getSchedulerResourceTypes()
      Get a set of the resource types considered by the scheduler.
      Returns:
      a Map of RM settings
    • setSchedulerResourceTypes

      @Private @Unstable public abstract void setSchedulerResourceTypes(EnumSet<org.apache.hadoop.yarn.proto.YarnServiceProtos.SchedulerResourceTypes> types)
      Set the resource types used by the scheduler.
      Parameters:
      types - a set of the resource types that the scheduler considers during scheduling
    • getResourceProfiles

      @Public @Unstable public abstract Map<String,Resource> getResourceProfiles()
      Get list of supported resource profiles from RM.
      Returns:
      a map of resource profiles and its capabilities.
    • setResourceProfiles

      @Private @Unstable public abstract void setResourceProfiles(Map<String,Resource> profiles)
      Set supported resource profiles for RM.
      Parameters:
      profiles - a map of resource profiles with its capabilities.
    • getResourceTypes

      @Public @Unstable public abstract List<org.apache.hadoop.yarn.api.records.ResourceTypeInfo> getResourceTypes()
      Get available resource types supported by RM.
      Returns:
      a Map of RM settings
    • setResourceTypes

      @Private @Unstable public abstract void setResourceTypes(List<org.apache.hadoop.yarn.api.records.ResourceTypeInfo> types)
      Set the resource types used by RM.
      Parameters:
      types - a set of the resource types supported by RM.