Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Redesign the task manager metric page, this would allow users to more clearly understand the relationship between these metrics.

Image RemovedImage Added

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();

}

...