public final class SchedulerRequestKey extends Object implements Comparable<SchedulerRequestKey>
Priority
.Constructor and Description |
---|
SchedulerRequestKey(org.apache.hadoop.yarn.api.records.Priority priority,
long allocationRequestId,
org.apache.hadoop.yarn.api.records.ContainerId containerToUpdate) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(SchedulerRequestKey o) |
static SchedulerRequestKey |
create(org.apache.hadoop.yarn.api.records.ResourceRequest req)
Factory method to generate a SchedulerRequestKey from a ResourceRequest.
|
static SchedulerRequestKey |
create(org.apache.hadoop.yarn.api.records.SchedulingRequest req)
Factory method to generate a SchedulerRequestKey from a SchedulingRequest.
|
static SchedulerRequestKey |
create(org.apache.hadoop.yarn.api.records.UpdateContainerRequest req,
SchedulerRequestKey schedulerRequestKey) |
boolean |
equals(Object o) |
static SchedulerRequestKey |
extractFrom(org.apache.hadoop.yarn.api.records.Container container)
Convenience method to extract the SchedulerRequestKey used to schedule the
Container.
|
long |
getAllocationRequestId()
Get the Id of the associated
ResourceRequest . |
org.apache.hadoop.yarn.api.records.ContainerId |
getContainerToUpdate() |
org.apache.hadoop.yarn.api.records.Priority |
getPriority()
Get the
Priority of the request. |
int |
hashCode() |
String |
toString() |
public SchedulerRequestKey(org.apache.hadoop.yarn.api.records.Priority priority, long allocationRequestId, org.apache.hadoop.yarn.api.records.ContainerId containerToUpdate)
public static SchedulerRequestKey create(org.apache.hadoop.yarn.api.records.ResourceRequest req)
req
- ResourceRequestpublic static SchedulerRequestKey create(org.apache.hadoop.yarn.api.records.SchedulingRequest req)
req
- SchedulingRequestpublic static SchedulerRequestKey create(org.apache.hadoop.yarn.api.records.UpdateContainerRequest req, SchedulerRequestKey schedulerRequestKey)
public static SchedulerRequestKey extractFrom(org.apache.hadoop.yarn.api.records.Container container)
container
- Containerpublic org.apache.hadoop.yarn.api.records.Priority getPriority()
Priority
of the request.Priority
of the requestpublic long getAllocationRequestId()
ResourceRequest
.ResourceRequest
public org.apache.hadoop.yarn.api.records.ContainerId getContainerToUpdate()
public int compareTo(SchedulerRequestKey o)
compareTo
in interface Comparable<SchedulerRequestKey>
Copyright © 2008–2018 Apache Software Foundation. All rights reserved.