Class RegisterApplicationMasterResponse
java.lang.Object
org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Map<ApplicationAccessType,String> Get theApplicationACLs for the application.abstract ByteBufferGet ClientToAMToken master key.Get the list of running containers as viewed byResourceManagerfrom previous application attempts.abstract ResourceGet the maximum capability for anyResourceallocated by theResourceManagerin the cluster.Get the list of NMTokens for communicating with the NMs where the containers of previous application attempts are running.abstract StringgetQueue()Get the queue that the application was placed in.Get list of supported resource profiles from RM.abstract List<org.apache.hadoop.yarn.api.records.ResourceTypeInfo>Get available resource types supported by RM.abstract EnumSet<org.apache.hadoop.yarn.proto.YarnServiceProtos.SchedulerResourceTypes>Get a set of the resource types considered by the scheduler.newInstance(Resource minCapability, Resource maxCapability, Map<ApplicationAccessType, String> acls, ByteBuffer key, List<Container> containersFromPreviousAttempt, String queue, List<NMToken> nmTokensFromPreviousAttempts) abstract voidsetApplicationACLs(Map<ApplicationAccessType, String> acls) Set theApplicationACLs for the application.abstract voidSet ClientToAMToken master key.abstract voidSet the list of running containers as viewed byResourceManagerfrom previous application attempts.abstract voidsetMaximumResourceCapability(Resource capability) abstract voidSet the list of NMTokens for communicating with the NMs where the the containers of previous application attempts are running.abstract voidSet the queue that the application was placed in.abstract voidSet supported resource profiles for RM.abstract voidsetResourceTypes(List<org.apache.hadoop.yarn.api.records.ResourceTypeInfo> types) Set the resource types used by RM.abstract voidsetSchedulerResourceTypes(EnumSet<org.apache.hadoop.yarn.proto.YarnServiceProtos.SchedulerResourceTypes> types) Set the resource types used by the scheduler.
-
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
Get the maximum capability for anyResourceallocated by theResourceManagerin the cluster.- Returns:
- maximum capability of allocated resources in the cluster
-
setMaximumResourceCapability
-
getApplicationACLs
Get theApplicationACLs for the application.- Returns:
- all the
ApplicationACLs
-
setApplicationACLs
Set theApplicationACLs for the application.- Parameters:
acls- ApplicationACLs for the application.
-
getClientToAMTokenMasterKey
Get ClientToAMToken master key.
The ClientToAMToken master key is sent to
ApplicationMasterbyResourceManagerviaRegisterApplicationMasterResponse, used to verify corresponding ClientToAMToken.- Returns:
- ClientToAMToken master key
-
setClientToAMTokenMasterKey
Set ClientToAMToken master key.- Parameters:
key- ClientToAMToken master key.
-
getQueue
Get the queue that the application was placed in.
- Returns:
- the queue that the application was placed in.
-
setQueue
Set the queue that the application was placed in.
- Parameters:
queue- queue.
-
getContainersFromPreviousAttempts
Get the list of running containers as viewed by
ResourceManagerfrom previous application attempts.- Returns:
- the list of running containers as viewed by
ResourceManagerfrom previous application attempts - See Also:
-
setContainersFromPreviousAttempts
@Private @Unstable public abstract void setContainersFromPreviousAttempts(List<Container> containersFromPreviousAttempt) Set the list of running containers as viewed byResourceManagerfrom previous application attempts.- Parameters:
containersFromPreviousAttempt- the list of running containers as viewed byResourceManagerfrom previous application attempts.
-
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
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
Get list of supported resource profiles from RM.- Returns:
- a map of resource profiles and its capabilities.
-
setResourceProfiles
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.
-