Class ResourceRequestSetKey
java.lang.Object
org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey
org.apache.hadoop.yarn.server.scheduler.ResourceRequestSetKey
- All Implemented Interfaces:
Comparable<SchedulerRequestKey>
The scheduler key for a group of
ResourceRequest.
TODO: after YARN-7631 is fixed by adding Resource and ExecType into
SchedulerRequestKey, then we can directly use that.-
Constructor Summary
ConstructorsConstructorDescriptionResourceRequestSetKey(long allocationRequestId, org.apache.hadoop.yarn.api.records.Priority priority, org.apache.hadoop.yarn.api.records.Resource resource, org.apache.hadoop.yarn.api.records.ExecutionType execType) Create the key object from member objects.ResourceRequestSetKey(org.apache.hadoop.yarn.api.records.ResourceRequest rr) Create the key object from aResourceRequest. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(SchedulerRequestKey other) booleanstatic ResourceRequestSetKeyextractMatchingKey(org.apache.hadoop.yarn.api.records.Container container, Set<ResourceRequestSetKey> keys) Extract the corresponding ResourceRequestSetKey for an allocated container from a given set.org.apache.hadoop.yarn.api.records.ExecutionTypeorg.apache.hadoop.yarn.api.records.ResourceinthashCode()toString()Methods inherited from class org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey
create, create, create, extractFrom, getAllocationRequestId, getContainerToUpdate, getPriority
-
Constructor Details
-
ResourceRequestSetKey
public ResourceRequestSetKey(org.apache.hadoop.yarn.api.records.ResourceRequest rr) throws org.apache.hadoop.yarn.exceptions.YarnException Create the key object from aResourceRequest.- Parameters:
rr- Resource request object- Throws:
org.apache.hadoop.yarn.exceptions.YarnException- if fails
-
ResourceRequestSetKey
public ResourceRequestSetKey(long allocationRequestId, org.apache.hadoop.yarn.api.records.Priority priority, org.apache.hadoop.yarn.api.records.Resource resource, org.apache.hadoop.yarn.api.records.ExecutionType execType) Create the key object from member objects.- Parameters:
allocationRequestId- allocate request id of the askpriority- the priority of the askresource- the resource size of the askexecType- the execution type of the ask
-
-
Method Details
-
getResource
public org.apache.hadoop.yarn.api.records.Resource getResource() -
getExeType
public org.apache.hadoop.yarn.api.records.ExecutionType getExeType() -
equals
- Overrides:
equalsin classSchedulerRequestKey
-
hashCode
public int hashCode()- Overrides:
hashCodein classSchedulerRequestKey
-
compareTo
- Specified by:
compareToin interfaceComparable<SchedulerRequestKey>- Overrides:
compareToin classSchedulerRequestKey
-
extractMatchingKey
public static ResourceRequestSetKey extractMatchingKey(org.apache.hadoop.yarn.api.records.Container container, Set<ResourceRequestSetKey> keys) Extract the corresponding ResourceRequestSetKey for an allocated container from a given set. Return null if not found.- Parameters:
container- the allocated containerkeys- the set of keys to look from- Returns:
- ResourceRequestSetKey
-
toString
- Overrides:
toStringin classSchedulerRequestKey
-