ResourcePBImpl (Apache Hadoop YARN Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.yarn.api.records.impl.pb, class: ResourcePBImpl

Package 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<org.apache.hadoop.yarn.api.records.Resource>`

@Private @Unstable public class ResourcePBImpl extends org.apache.hadoop.yarn.api.records.Resource

- ## Field Summary

  ### Fields inherited from class org.apache.hadoop.yarn.api.records.Resource

  `MEMORY_INDEX, resources, VCORES_INDEX`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ResourcePBImpl()`
  `ResourcePBImpl(org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto proto)`

- ## Method Summary

  Modifier and Type
  Method
  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)`

  ### Methods inherited from class org.apache.hadoop.yarn.api.records.Resource

  `castToIntSafely, compareTo, copy, equals, getAllResourcesListCopy, getFormattedString, getFormattedString, getResourceInformation, getResources, hashCode, newDefaultInformation, newInstance, newInstance, newInstance, newInstance, setResourceInformation, setResources, setResourceValue, throwExceptionWhenArrayOutOfBound, toFormattedString, toString`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ResourcePBImpl

    public ResourcePBImpl()

  - ### ResourcePBImpl

    public ResourcePBImpl(org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto proto)

- ## Method Details

  - ### getProto

    public org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto getProto()

  - ### getMemory

    public int getMemory()
    Specified by:
      `getMemory` in class `org.apache.hadoop.yarn.api.records.Resource`

  - ### getMemorySize

    public long getMemorySize()
    Overrides:
      `getMemorySize` in class `org.apache.hadoop.yarn.api.records.Resource`

  - ### setMemory

    public void setMemory(int memory)
    Specified by:
      `setMemory` in class `org.apache.hadoop.yarn.api.records.Resource`

  - ### setMemorySize

    public void setMemorySize(long memory)
    Overrides:
      `setMemorySize` in class `org.apache.hadoop.yarn.api.records.Resource`

  - ### getVirtualCores

    public int getVirtualCores()
    Specified by:
      `getVirtualCores` in class `org.apache.hadoop.yarn.api.records.Resource`

  - ### setVirtualCores

    public void setVirtualCores(int vCores)
    Specified by:
      `setVirtualCores` in class `org.apache.hadoop.yarn.api.records.Resource`

  - ### setResourceInformation

    public void setResourceInformation(String resource, org.apache.hadoop.yarn.api.records.ResourceInformation resourceInformation)
    Overrides:
      `setResourceInformation` in class `org.apache.hadoop.yarn.api.records.Resource`

  - ### setResourceValue

    public void setResourceValue(String resource, long value)
    Overrides:
      `setResourceValue` in class `org.apache.hadoop.yarn.api.records.Resource`

  - ### getResourceInformation

    public org.apache.hadoop.yarn.api.records.ResourceInformation getResourceInformation(String resource)
    Overrides:
      `getResourceInformation` in class `org.apache.hadoop.yarn.api.records.Resource`

  - ### getResourceValue

    public long getResourceValue(String resource)
    Overrides:
      `getResourceValue` in class `org.apache.hadoop.yarn.api.records.Resource`