apache/seatunnel
在 GitHub 查看[Docs][Core] Add Javadoc to CoordinatorService (scheduling and HA methods)
Open
#10,544 创建于 2026年2月28日
help wanted
仓库指标
- Star
- (6,897 star)
- PR 合并指标
- (平均合并 13天 21小时) (30 天内合并 143 个 PR)
描述
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