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

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

public class ResourcePBImpl
extends Resource


Constructor Summary
ResourcePBImpl()
           
ResourcePBImpl(YarnProtos.ResourceProto proto)
           
 
Method Summary
 int compareTo(Resource other)
           
 int getMemory()
          Get memory of the resource.
 YarnProtos.ResourceProto getProto()
           
 int getVirtualCores()
          Get number of virtual cpu cores of the resource.
 void setMemory(int memory)
          Set memory of the resource.
 void setVirtualCores(int vCores)
          Set number of virtual cpu cores of the resource.
 
Methods inherited from class org.apache.hadoop.yarn.api.records.Resource
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourcePBImpl

public ResourcePBImpl()

ResourcePBImpl

public ResourcePBImpl(YarnProtos.ResourceProto proto)
Method Detail

getProto

public YarnProtos.ResourceProto getProto()

getMemory

public int getMemory()
Description copied from class: Resource
Get memory of the resource.

Specified by:
getMemory in class Resource
Returns:
memory of the resource

setMemory

public void setMemory(int memory)
Description copied from class: Resource
Set memory of the resource.

Specified by:
setMemory in class Resource
Parameters:
memory - memory of the resource

getVirtualCores

public int getVirtualCores()
Description copied from class: Resource
Get number of virtual cpu cores of the resource. We refer to virtual cores to clarify that these represent normalized cores which may have a m:n relationship w.r.t physical cores available on the compute nodes. Furthermore, they also represent idealized cores since the cluster might be composed of heterogenous nodes.

Specified by:
getVirtualCores in class Resource
Returns:
num of virtual cpu cores of the resource

setVirtualCores

public void setVirtualCores(int vCores)
Description copied from class: Resource
Set number of virtual cpu cores of the resource. We refer to virtual cores to clarify that these represent normalized cores which may have a m:n relationship w.r.t physical cores available on the compute nodes. Furthermore, they also represent idealized cores since the cluster might be composed of heterogenous nodes.

Specified by:
setVirtualCores in class Resource
Parameters:
vCores - number of virtual cpu cores of the resource

compareTo

public int compareTo(Resource other)


Copyright © 2013 Apache Software Foundation. All Rights Reserved.