...
Redesign the task manager metric page, this would allow users to more clearly understand the relationship between these metrics.
REST API Design
...
public static final MemoryType DEFAULT_MEMORY_TYPE = MemoryType.OFF_HEAP; |
- add getManagedMemoryTotal in TaskExecutor:
public long getManagedMemoryTotal() { return this.taskSlotTable.getAllocatedSlots().stream().mapToLong( slot -> slot.getMemoryManager().getMemorySizeByType(MemoryManager.DEFAULT_MEMORY_TYPE) ).sum(); } |
- add getManagedMemoryUsed in TaskExecutorregister ManagedMemoryUsage in TaskExecutor#requestSlot:
public long getManagedMemoryUsed() { return this.taskSlotTable.getAllocatedSlots().stream().mapToLong( slot -> slot.getMemoryManager().getMemorySizeByType(MemoryManager.DEFAULT_MEMORY_TYPE)- slot.getMemoryManager().availableMemory(MemoryManager.DEFAULT_MEMORY_TYPE) ).sum(); } |
...