@InterfaceAudience.Public @InterfaceStability.Stable public abstract class ResourceRequest extends Object implements Comparable<ResourceRequest>
ResourceRequest
represents the request made by an
application to the ResourceManager
to obtain various
Container
allocations.
It includes:
Priority
of the request.Resource
required for each request.Constructor and Description |
---|
ResourceRequest() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ResourceRequest other) |
boolean |
equals(Object obj) |
abstract Resource |
getCapability()
Get the
Resource capability of the request. |
abstract String |
getHostName()
Get the host/rack on which the allocation is desired.
|
abstract int |
getNumContainers()
Get the number of containers required with the given specifications.
|
abstract org.apache.hadoop.yarn.api.records.Priority |
getPriority()
Get the
Priority of the request. |
int |
hashCode() |
abstract void |
setCapability(Resource capability)
Set the
Resource capability of the request |
abstract void |
setHostName(String hostName)
Set host/rack on which the allocation is desired.
|
abstract void |
setNumContainers(int numContainers)
Set the number of containers required with the given specifications
|
abstract void |
setPriority(org.apache.hadoop.yarn.api.records.Priority priority)
Set the
Priority of the request |
public ResourceRequest()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract org.apache.hadoop.yarn.api.records.Priority getPriority()
Priority
of the request.Priority
of the request@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setPriority(org.apache.hadoop.yarn.api.records.Priority priority)
Priority
of the requestpriority
- Priority
of the request@InterfaceAudience.Public @InterfaceStability.Stable public abstract String getHostName()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setHostName(String hostName)
hostName
- host/rack on which the allocation is desired@InterfaceAudience.Public @InterfaceStability.Stable public abstract Resource getCapability()
Resource
capability of the request.Resource
capability of the request@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setCapability(Resource capability)
Resource
capability of the requestcapability
- Resource
capability of the request@InterfaceAudience.Public @InterfaceStability.Stable public abstract int getNumContainers()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setNumContainers(int numContainers)
numContainers
- number of containers required with the given
specificationspublic int compareTo(ResourceRequest other)
compareTo
in interface Comparable<ResourceRequest>
Copyright © 2014 Apache Software Foundation. All Rights Reserved.