Class SchedulerRequestKey
java.lang.Object
org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey
- All Implemented Interfaces:
Comparable<SchedulerRequestKey>
- Direct Known Subclasses:
ResourceRequestSetKey
Composite key for outstanding scheduler requests for any schedulable entity.
Currently it includes
Priority.-
Constructor Summary
ConstructorsConstructorDescriptionSchedulerRequestKey(org.apache.hadoop.yarn.api.records.Priority priority, long allocationRequestId, org.apache.hadoop.yarn.api.records.ContainerId containerToUpdate) -
Method Summary
Modifier and TypeMethodDescriptionintstatic SchedulerRequestKeycreate(org.apache.hadoop.yarn.api.records.ResourceRequest req) Factory method to generate a SchedulerRequestKey from a ResourceRequest.static SchedulerRequestKeycreate(org.apache.hadoop.yarn.api.records.SchedulingRequest req) Factory method to generate a SchedulerRequestKey from a SchedulingRequest.static SchedulerRequestKeycreate(org.apache.hadoop.yarn.api.records.UpdateContainerRequest req, SchedulerRequestKey schedulerRequestKey) booleanstatic SchedulerRequestKeyextractFrom(org.apache.hadoop.yarn.api.records.Container container) Convenience method to extract the SchedulerRequestKey used to schedule the Container.longGet the Id of the associatedResourceRequest.org.apache.hadoop.yarn.api.records.ContainerIdorg.apache.hadoop.yarn.api.records.PriorityGet thePriorityof the request.inthashCode()toString()
-
Constructor Details
-
SchedulerRequestKey
public SchedulerRequestKey(org.apache.hadoop.yarn.api.records.Priority priority, long allocationRequestId, org.apache.hadoop.yarn.api.records.ContainerId containerToUpdate)
-
-
Method Details
-
create
Factory method to generate a SchedulerRequestKey from a ResourceRequest.- Parameters:
req- ResourceRequest- Returns:
- SchedulerRequestKey
-
create
Factory method to generate a SchedulerRequestKey from a SchedulingRequest.- Parameters:
req- SchedulingRequest- Returns:
- SchedulerRequestKey
-
create
public static SchedulerRequestKey create(org.apache.hadoop.yarn.api.records.UpdateContainerRequest req, SchedulerRequestKey schedulerRequestKey) -
extractFrom
public static SchedulerRequestKey extractFrom(org.apache.hadoop.yarn.api.records.Container container) Convenience method to extract the SchedulerRequestKey used to schedule the Container.- Parameters:
container- Container- Returns:
- SchedulerRequestKey
-
getPriority
public org.apache.hadoop.yarn.api.records.Priority getPriority()Get thePriorityof the request.- Returns:
- the
Priorityof the request
-
getAllocationRequestId
public long getAllocationRequestId()Get the Id of the associatedResourceRequest.- Returns:
- the Id of the associated
ResourceRequest
-
getContainerToUpdate
public org.apache.hadoop.yarn.api.records.ContainerId getContainerToUpdate() -
compareTo
- Specified by:
compareToin interfaceComparable<SchedulerRequestKey>
-
equals
-
hashCode
public int hashCode() -
toString
-