@InterfaceAudience.Private @InterfaceStability.Unstable public class ResourcePBImpl extends Resource
Constructor and Description |
---|
ResourcePBImpl() |
ResourcePBImpl(YarnProtos.ResourceProto proto) |
Modifier and Type | Method and Description |
---|---|
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.
|
equals, hashCode, newInstance, toString
public ResourcePBImpl()
public ResourcePBImpl(YarnProtos.ResourceProto proto)
public YarnProtos.ResourceProto getProto()
public int getMemory()
Resource
public void setMemory(int memory)
Resource
public int getVirtualCores()
Resource
getVirtualCores
in class Resource
public void setVirtualCores(int vCores)
Resource
setVirtualCores
in class Resource
vCores
- number of virtual cpu cores of the resourcepublic int compareTo(Resource other)
Copyright © 2013 Apache Software Foundation. All rights reserved.