Class HardwareDescription
java.lang.Object
org.apache.flink.runtime.instance.HardwareDescription
- All Implemented Interfaces:
Serializable
A hardware description describes the resources available to a task manager.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHardwareDescription(int numberOfCPUCores, long sizeOfPhysicalMemory, long sizeOfJvmHeap, long sizeOfManagedMemory) Constructs a new hardware description object. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic HardwareDescriptionextractFromSystem(long managedMemory) intReturns the number of CPU cores available to the JVM on the compute node.longReturns the size of the JVM heap memorylongReturns the size of the memory managed by the system for caching, hashing, sorting, ...longReturns the size of physical memory in bytes available on the compute node.inthashCode()toString()
-
Field Details
-
FIELD_NAME_CPU_CORES
- See Also:
-
FIELD_NAME_SIZE_PHYSICAL_MEMORY
- See Also:
-
FIELD_NAME_SIZE_JVM_HEAP
- See Also:
-
FIELD_NAME_SIZE_MANAGED_MEMORY
- See Also:
-
-
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
-
hashCode
public int hashCode() -
toString
-
extractFromSystem
-