This is an automated email from the ASF dual-hosted git repository.
dmvk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new acd34941e34 [FLINK-32169][ui] Show slot allocations on TM page
acd34941e34 is described below
commit acd34941e349cdb513fc41669a298cc1c33cc3ec
Author: Chesnay Schepler <[email protected]>
AuthorDate: Tue May 23 16:26:05 2023 +0200
[FLINK-32169][ui] Show slot allocations on TM page
---
.../src/app/interfaces/task-manager.ts | 6 ++++
.../metrics/task-manager-metrics.component.html | 36 +++++++++++++++++++++-
2 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/flink-runtime-web/web-dashboard/src/app/interfaces/task-manager.ts
b/flink-runtime-web/web-dashboard/src/app/interfaces/task-manager.ts
index 9c574bb71fc..c0865d2d0a6 100644
--- a/flink-runtime-web/web-dashboard/src/app/interfaces/task-manager.ts
+++ b/flink-runtime-web/web-dashboard/src/app/interfaces/task-manager.ts
@@ -33,6 +33,12 @@ export interface TaskManagerDetail {
blocked?: boolean;
freeResource: Resources;
totalResource: Resources;
+ allocatedSlots: AllocatedSlot[];
+}
+
+export interface AllocatedSlot {
+ jobId: string;
+ resource: Resources;
}
export interface Resources {
diff --git
a/flink-runtime-web/web-dashboard/src/app/pages/task-manager/metrics/task-manager-metrics.component.html
b/flink-runtime-web/web-dashboard/src/app/pages/task-manager/metrics/task-manager-metrics.component.html
index 99a36df3f95..b4a41b521f2 100644
---
a/flink-runtime-web/web-dashboard/src/app/pages/task-manager/metrics/task-manager-metrics.component.html
+++
b/flink-runtime-web/web-dashboard/src/app/pages/task-manager/metrics/task-manager-metrics.component.html
@@ -318,7 +318,7 @@
</tr>
</ng-template>
-<nz-card nzTitle="Resources" nzSize="small">
+<nz-card nzTitle="Resources" nzSize="small" class="flink-memory-model">
<nz-table
nzBordered
nzTitle="Unassigned resources"
@@ -383,4 +383,38 @@
></ng-container>
</tbody>
</nz-table>
+ <nz-table
+ nzBordered
+ nzTitle="Allocated slots"
+ [nzTemplateMode]="true"
+ [nzFrontPagination]="false"
+ [nzShowPagination]="false"
+ [nzSize]="'small'"
+ class="no-border top-margin"
+ >
+ <thead>
+ <tr>
+ <th>#</th>
+ <th>Job ID</th>
+ <th>CPU (cores)</th>
+ <th>Task Heap memory (MB)</th>
+ <th>Task Off-Heap memory (MB)</th>
+ <th>Managed memory (MB)</th>
+ <th>Network memory (MB)</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr *ngFor="let slot of taskManagerDetail?.allocatedSlots; let i =
index">
+ <td>
+ <strong>{{ i | number }}</strong>
+ </td>
+ <td>{{ slot.jobId }}</td>
+ <td>{{ slot.resource.cpuCores | number }}</td>
+ <td>{{ slot.resource.taskHeapMemory | number }}</td>
+ <td>{{ slot.resource.taskOffHeapMemory | number }}</td>
+ <td>{{ slot.resource.managedMemory | number }}</td>
+ <td>{{ slot.resource.networkMemory | number }}</td>
+ </tr>
+ </tbody>
+ </nz-table>
</nz-card>