org.apache.hadoop.yarn.api.records.impl.pb
Class ResourceRequestPBImpl

java.lang.Object
  extended by org.apache.hadoop.yarn.api.records.ResourceRequest
      extended by org.apache.hadoop.yarn.api.records.impl.pb.ResourceRequestPBImpl
All Implemented Interfaces:
Comparable<ResourceRequest>

public class ResourceRequestPBImpl
extends ResourceRequest


Constructor Summary
ResourceRequestPBImpl()
           
ResourceRequestPBImpl(YarnProtos.ResourceRequestProto proto)
           
 
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.
 Priority getPriority()
          Get the Priority of the request.
 YarnProtos.ResourceRequestProto getProto()
           
 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(Priority priority)
          Set the Priority of the request
 
Methods inherited from class org.apache.hadoop.yarn.api.records.ResourceRequest
compareTo, equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceRequestPBImpl

public ResourceRequestPBImpl()

ResourceRequestPBImpl

public ResourceRequestPBImpl(YarnProtos.ResourceRequestProto proto)
Method Detail

getProto

public YarnProtos.ResourceRequestProto getProto()

getPriority

public Priority getPriority()
Description copied from class: ResourceRequest
Get the Priority of the request.

Specified by:
getPriority in class ResourceRequest
Returns:
Priority of the request

setPriority

public void setPriority(Priority priority)
Description copied from class: ResourceRequest
Set the Priority of the request

Specified by:
setPriority in class ResourceRequest
Parameters:
priority - Priority of the request

getHostName

public String getHostName()
Description copied from class: ResourceRequest
Get the host/rack on which the allocation is desired. A special value of * signifies that any host/rack is acceptable.

Specified by:
getHostName in class ResourceRequest
Returns:
host/rack on which the allocation is desired

setHostName

public void setHostName(String hostName)
Description copied from class: ResourceRequest
Set host/rack on which the allocation is desired. A special value of * signifies that any host/rack is acceptable.

Specified by:
setHostName in class ResourceRequest
Parameters:
hostName - host/rack on which the allocation is desired

getCapability

public Resource getCapability()
Description copied from class: ResourceRequest
Get the Resource capability of the request.

Specified by:
getCapability in class ResourceRequest
Returns:
Resource capability of the request

setCapability

public void setCapability(Resource capability)
Description copied from class: ResourceRequest
Set the Resource capability of the request

Specified by:
setCapability in class ResourceRequest
Parameters:
capability - Resource capability of the request

getNumContainers

public int getNumContainers()
Description copied from class: ResourceRequest
Get the number of containers required with the given specifications.

Specified by:
getNumContainers in class ResourceRequest
Returns:
number of containers required with the given specifications

setNumContainers

public void setNumContainers(int numContainers)
Description copied from class: ResourceRequest
Set the number of containers required with the given specifications

Specified by:
setNumContainers in class ResourceRequest
Parameters:
numContainers - number of containers required with the given specifications


Copyright © 2012 Apache Software Foundation. All Rights Reserved.