danielnadean opened a new pull request, #11733: URL: https://github.com/apache/seatunnel/pull/11733
## Purpose Implements issue #11665: extend the Zeta Web UI Workers/Master page into a usable node resource view. This is the implementation follow-up to the STIP/design PR #11732 (please merge #11732 first, or at least review it alongside this one - this PR's docs link to the design page it adds). ## What changed **Backend (read-only projection, no new scheduling behavior):** - `WorkerOverviewInfo`: a new DTO, one row per worker (`host`, `port`, `totalSlot`, `usedSlot`, `dynamicSlot`, `cpuPercentage`, `memPercentage`, `attributes`). - `GetWorkerOverviewOperation`: maps `ResourceManager#getRegisterWorker()`'s live `WorkerProfile` map to `WorkerOverviewInfo` - `totalSlot`/`usedSlot` come directly from `assignedSlots.length`/`unassignedSlots.length`, which is the same state the resource manager itself uses to accept or reject allocation requests. No new field is added to `WorkerProfile`, and no allocation/scheduling code path is touched. - `WorkerOverviewService` / `WorkerOverviewServlet`: new `GET /resource/workers` endpoint, following the exact local-vs-forward-to-master routing already used by `OverviewService`/`OverviewServlet`. - Wiring: `RestConstant#REST_URL_WORKER_OVERVIEW`, `JettyService` servlet registration, `ResourceDataSerializerHook#GET_WORKER_OVERVIEW_TYPE` (next available id, 13). **Frontend:** - `managers/index.tsx`: fetches `/system-monitoring-information` and `/resource/workers` in parallel and joins them client-side by `host:port` (the new call is wrapped in `.catch()` so a resource-manager hiccup never blocks the existing monitoring table). Table now shows Host, Port, Role, CPU Load, Heap Used/Max, Physical MEM, GC, Threads, and Slots (used/total) instead of today's 4 columns. Re-enables the previously commented-out Action column as a "View Details" drawer (reusing the existing `Configuration` key-value component) showing the complete raw payload for a row. - `service/manager/types.ts` / `index.ts`: `WorkerOverview` type and `getWorkerOverview()` call. **Docs:** `web-ui.md` (EN/ZH) capability description, `rest-api-v2.md` (EN/ZH) endpoint reference. **Tests:** `GetWorkerOverviewOperationTest` covers the `WorkerProfile` -> `WorkerOverviewInfo` mapping, including a worker with no slots/load info yet reported (must not throw). `managers.spec.ts` covers the client-side join, including a row with no matching `WorkerOverview` entry. ## Non-goals (see the design doc) Per-worker "tasks currently running here" (would need `/trace/task-mapping` fan-out across all running jobs), historical retention, capacity planning - explicitly deferred, not silently dropped. ## Validation - `./mvnw spotless:apply -pl seatunnel-engine/seatunnel-engine-server -am` - clean. - `npx prettier --write` / `npx eslint --fix` on the changed frontend files - clean. - Per this SeaTunnel workspace's local-verification policy, no local compile/test/service run was performed; CI is the functional validation source for both the new Java unit test and the Vitest component test. Refs #11665 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
