@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, toString
public 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.Resource
public long getMemorySize()
getMemorySize
in class org.apache.hadoop.yarn.api.records.Resource
public void setMemory(int memory)
setMemory
in class org.apache.hadoop.yarn.api.records.Resource
public void setMemorySize(long memory)
setMemorySize
in class org.apache.hadoop.yarn.api.records.Resource
public int getVirtualCores()
getVirtualCores
in class org.apache.hadoop.yarn.api.records.Resource
public void setVirtualCores(int vCores)
setVirtualCores
in class org.apache.hadoop.yarn.api.records.Resource
public void setResourceInformation(String resource, org.apache.hadoop.yarn.api.records.ResourceInformation resourceInformation)
setResourceInformation
in class org.apache.hadoop.yarn.api.records.Resource
public void setResourceValue(String resource, long value)
setResourceValue
in class org.apache.hadoop.yarn.api.records.Resource
public org.apache.hadoop.yarn.api.records.ResourceInformation getResourceInformation(String resource)
getResourceInformation
in class org.apache.hadoop.yarn.api.records.Resource
public long getResourceValue(String resource)
getResourceValue
in class org.apache.hadoop.yarn.api.records.Resource
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.