apache/seatunnel
View on GitHub[Docs][Core] Add Javadoc to CoordinatorService (scheduling and HA methods)
Open
#10544 opened on Feb 28, 2026
help wanted
Description
Sub-issue of #10533
Scope
CoordinatorService is the Zeta master-node coordinator: it schedules pending jobs, handles master failover, and manages JobMaster lifecycle. The job scheduling and HA restoration methods have no Javadoc despite being the most critical for understanding Zeta's reliability model.
File
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/CoordinatorService.java
Methods to document
| Method | Line | What to explain |
|---|---|---|
startPendingJobScheduleThread() |
227 | Background thread purpose; loop structure; exception handling and restart policy |
pendingJobSchedule() |
250 | Peek-then-consume pattern on PendingJobQueue; resource pre-check before dequeue; PendingSourceState.RESTORE vs SUBMIT semantics |
completeFailJob(JobMaster, ...) |
334 | Why insufficient-resource failures are handled separately from runtime failures |
restoreAllRunningJobFromMasterNodeSwitch() |
449 | Master HA failover: iterates runningJobInfoIMap to reconstruct JobMaster for each in-flight job |
restoreJobFromMasterActiveSwitch(Long, JobInfo) |
506 | Per-job restore path during master switch; difference from normal job submission |
checkNewActiveMaster() |
539 | Hazelcast master-node detection; triggers initCoordinatorService on promotion |
clearCoordinatorService() |
566 | Graceful shutdown ordering: cancels running jobs, shuts down executors, clears IMaps |
How to contribute
- Fork the repo and create a branch
- Add Javadoc to the methods above
- Run
./mvnw spotless:applyand./mvnw -q -DskipTests verify - Open a PR with title:
[Docs][Core] Add Javadoc to CoordinatorService scheduling and HA methods