Class HardwareDescription

java.lang.Object
org.apache.flink.runtime.instance.HardwareDescription
All Implemented Interfaces:
Serializable

public final class HardwareDescription extends Object implements Serializable
A hardware description describes the resources available to a task manager.
See Also:
  • Field Details

  • Constructor Details

    • HardwareDescription

      public HardwareDescription(int numberOfCPUCores, long sizeOfPhysicalMemory, long sizeOfJvmHeap, long sizeOfManagedMemory)
      Constructs a new hardware description object.
      Parameters:
      numberOfCPUCores - The number of CPU cores available to the JVM on the compute node.
      sizeOfPhysicalMemory - The size of physical memory in bytes available on the compute node.
      sizeOfJvmHeap - The size of the JVM heap memory.
      sizeOfManagedMemory - The size of the memory managed by the system for caching, hashing, sorting, ...
  • Method Details

    • getNumberOfCPUCores

      public int getNumberOfCPUCores()
      Returns the number of CPU cores available to the JVM on the compute node.
      Returns:
      the number of CPU cores available to the JVM on the compute node
    • getSizeOfPhysicalMemory

      public long getSizeOfPhysicalMemory()
      Returns the size of physical memory in bytes available on the compute node.
      Returns:
      the size of physical memory in bytes available on the compute node
    • getSizeOfJvmHeap

      public long getSizeOfJvmHeap()
      Returns the size of the JVM heap memory
      Returns:
      The size of the JVM heap memory
    • getSizeOfManagedMemory

      public long getSizeOfManagedMemory()
      Returns the size of the memory managed by the system for caching, hashing, sorting, ...
      Returns:
      The size of the memory managed by the system.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • extractFromSystem

      public static HardwareDescription extractFromSystem(long managedMemory)