Apache Software Foundation / SeaTunnel
Merged upstreamFeatureMerged Aug 29, 2026

Add a worker resource REST API

Implemented the backend worker-resource view for SeaTunnel Zeta, exposing current capacity and utilization through both standard and Hazelcast REST paths.

apache/seatunnel · #11909

Zeta observability feature

Operators can now inspect per-worker slots, CPU, heap, running jobs, tags, and snapshot freshness through stable REST endpoints.

Problem

Zeta operators lacked a supported endpoint for inspecting worker-level resource state. Any backend contract also needed to distinguish fixed and dynamic slot semantics, tolerate incomplete heartbeats and membership changes, and remain compatible across rolling upgrades.

Approach

Built snapshots from the existing worker diagnostic model and live profiles, added `/resource/workers` and its v1 endpoint, exposed slot, CPU, heap, system, job, tag, availability, and collection-time fields, and represented election or membership gaps as explicitly unavailable snapshots without changing allocation behavior.

Impact and scope

  • Provides a stable operational contract for diagnosing worker capacity and utilization without inspecting engine internals.
  • Avoids presenting assigned plus unassigned dynamic slots as a misleading fixed-capacity total.
  • Preserves serialized diagnostic compatibility while handling failover, member departure, stale data, and incomplete heartbeat profiles explicitly.

Validation

  • Added 12 focused tests covering fixed and dynamic slots, released capacity, incomplete profiles, unavailable snapshots, failover, membership changes, operation registration, and servlet JSON.
  • Verified old and updated diagnostic forms can be serialized and read in both directions, plus package and repository verification.
  • All five authored commits and the merge commit are GitHub-verified; the change received approvals from two maintainers.