@InterfaceAudience.Private
@InterfaceStability.Unstable
public class ResourcePBImpl
extends org.apache.hadoop.yarn.api.records.Resource
| Constructor and Description |
|---|
ResourcePBImpl() |
ResourcePBImpl(org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto proto) |
| Modifier and Type | Method and Description |
|---|---|
int |
getMemory() |
long |
getMemorySize() |
org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto |
getProto() |
org.apache.hadoop.yarn.api.records.ResourceInformation |
getResourceInformation(String resource) |
long |
getResourceValue(String resource) |
int |
getVirtualCores() |
void |
setMemory(int memory) |
void |
setMemorySize(long memory) |
void |
setResourceInformation(String resource,
org.apache.hadoop.yarn.api.records.ResourceInformation resourceInformation) |
void |
setResourceValue(String resource,
long value) |
void |
setVirtualCores(int vCores) |
castToIntSafely, compareTo, copy, equals, getAllResourcesListCopy, getFormattedString, getResourceInformation, getResources, hashCode, newDefaultInformation, newInstance, newInstance, newInstance, newInstance, setResourceInformation, setResourceValue, throwExceptionWhenArrayOutOfBound, toStringpublic ResourcePBImpl()
public ResourcePBImpl(org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto proto)
public org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto getProto()
public int getMemory()
getMemory in class org.apache.hadoop.yarn.api.records.Resourcepublic long getMemorySize()
getMemorySize in class org.apache.hadoop.yarn.api.records.Resourcepublic void setMemory(int memory)
setMemory in class org.apache.hadoop.yarn.api.records.Resourcepublic void setMemorySize(long memory)
setMemorySize in class org.apache.hadoop.yarn.api.records.Resourcepublic int getVirtualCores()
getVirtualCores in class org.apache.hadoop.yarn.api.records.Resourcepublic void setVirtualCores(int vCores)
setVirtualCores in class org.apache.hadoop.yarn.api.records.Resourcepublic void setResourceInformation(String resource, org.apache.hadoop.yarn.api.records.ResourceInformation resourceInformation)
setResourceInformation in class org.apache.hadoop.yarn.api.records.Resourcepublic void setResourceValue(String resource, long value)
setResourceValue in class org.apache.hadoop.yarn.api.records.Resourcepublic org.apache.hadoop.yarn.api.records.ResourceInformation getResourceInformation(String resource)
getResourceInformation in class org.apache.hadoop.yarn.api.records.Resourcepublic long getResourceValue(String resource)
getResourceValue in class org.apache.hadoop.yarn.api.records.ResourceCopyright © 2008–2022 Apache Software Foundation. All rights reserved.