org.apache.hadoop.yarn.api.records.impl.pb
Class ResourcePBImpl
java.lang.Object
org.apache.hadoop.yarn.api.records.Resource
org.apache.hadoop.yarn.api.records.impl.pb.ResourcePBImpl
- All Implemented Interfaces:
- Comparable<Resource>
public class ResourcePBImpl
- extends Resource
ResourcePBImpl
public ResourcePBImpl()
ResourcePBImpl
public ResourcePBImpl(YarnProtos.ResourceProto proto)
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.