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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
FIELD_NAME_CPU_CORES
static String
FIELD_NAME_SIZE_JVM_HEAP
static String
FIELD_NAME_SIZE_MANAGED_MEMORY
static String
FIELD_NAME_SIZE_PHYSICAL_MEMORY
-
Constructor Summary
Constructors Constructor Description HardwareDescription(int numberOfCPUCores, long sizeOfPhysicalMemory, long sizeOfJvmHeap, long sizeOfManagedMemory)
Constructs a new hardware description object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static HardwareDescription
extractFromSystem(long managedMemory)
int
getNumberOfCPUCores()
Returns the number of CPU cores available to the JVM on the compute node.long
getSizeOfJvmHeap()
Returns the size of the JVM heap memorylong
getSizeOfManagedMemory()
Returns the size of the memory managed by the system for caching, hashing, sorting, ...long
getSizeOfPhysicalMemory()
Returns the size of physical memory in bytes available on the compute node.int
hashCode()
String
toString()
-
-
-
Field Detail
-
FIELD_NAME_CPU_CORES
public static final String FIELD_NAME_CPU_CORES
- See Also:
- Constant Field Values
-
FIELD_NAME_SIZE_PHYSICAL_MEMORY
public static final String FIELD_NAME_SIZE_PHYSICAL_MEMORY
- See Also:
- Constant Field Values
-
FIELD_NAME_SIZE_JVM_HEAP
public static final String FIELD_NAME_SIZE_JVM_HEAP
- See Also:
- Constant Field Values
-
FIELD_NAME_SIZE_MANAGED_MEMORY
public static final String FIELD_NAME_SIZE_MANAGED_MEMORY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 Detail
-
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.
-
extractFromSystem
public static HardwareDescription extractFromSystem(long managedMemory)
-
-