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>

      @InterfaceAudience.Private
       @InterfaceStability.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, NUM_MANDATORY_RESOURCES, resources, VCORES_INDEX`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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)`

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

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

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

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

- - ### Constructor Detail

    - #### ResourcePBImpl

          public ResourcePBImpl()

    - #### ResourcePBImpl

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

  - ### Method Detail

    - #### 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`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.