org.apache.hadoop.yarn.api.records
Interface ResourceRequest

All Superinterfaces:
Comparable<ResourceRequest>

@InterfaceAudience.Public
@InterfaceStability.Stable
public interface ResourceRequest
extends Comparable<ResourceRequest>

ResourceRequest represents the request made by an application to the ResourceManager to obtain various Container allocations.

It includes:

See Also:
Resource, AMRMProtocol.allocate(org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest)

Method Summary
 Resource getCapability()
          Get the Resource capability of the request.
 String getHostName()
          Get the host/rack on which the allocation is desired.
 int getNumContainers()
          Get the number of containers required with the given specifications.
 org.apache.hadoop.yarn.api.records.Priority getPriority()
          Get the Priority of the request.
 void setCapability(Resource capability)
          Set the Resource capability of the request
 void setHostName(String hostName)
          Set host/rack on which the allocation is desired.
 void setNumContainers(int numContainers)
          Set the number of containers required with the given specifications
 void setPriority(org.apache.hadoop.yarn.api.records.Priority priority)
          Set the Priority of the request
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getPriority

@InterfaceAudience.Public
@InterfaceStability.Stable
org.apache.hadoop.yarn.api.records.Priority getPriority()
Get the Priority of the request.

Returns:
Priority of the request

setPriority

@InterfaceAudience.Public
@InterfaceStability.Stable
void setPriority(org.apache.hadoop.yarn.api.records.Priority priority)
Set the Priority of the request

Parameters:
priority - Priority of the request

getHostName

@InterfaceAudience.Public
@InterfaceStability.Stable
String getHostName()
Get the host/rack on which the allocation is desired. A special value of * signifies that any host/rack is acceptable.

Returns:
host/rack on which the allocation is desired

setHostName

@InterfaceAudience.Public
@InterfaceStability.Stable
void setHostName(String hostName)
Set host/rack on which the allocation is desired. A special value of * signifies that any host/rack is acceptable.

Parameters:
hostName - host/rack on which the allocation is desired

getCapability

@InterfaceAudience.Public
@InterfaceStability.Stable
Resource getCapability()
Get the Resource capability of the request.

Returns:
Resource capability of the request

setCapability

@InterfaceAudience.Public
@InterfaceStability.Stable
void setCapability(Resource capability)
Set the Resource capability of the request

Parameters:
capability - Resource capability of the request

getNumContainers

@InterfaceAudience.Public
@InterfaceStability.Stable
int getNumContainers()
Get the number of containers required with the given specifications.

Returns:
number of containers required with the given specifications

setNumContainers

@InterfaceAudience.Public
@InterfaceStability.Stable
void setNumContainers(int numContainers)
Set the number of containers required with the given specifications

Parameters:
numContainers - number of containers required with the given specifications


Copyright © 2011 Apache Software Foundation. All Rights Reserved.