You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "davidzollo (via GitHub)" <gi...@apache.org> on 2026/02/28 04:49:29 UTC
[I] [Docs][Core] Add Javadoc to TaskExecutionService inner classes (cooperative/blocking execution model) [seatunnel]
davidzollo opened a new issue, #10546:
URL: https://github.com/apache/seatunnel/issues/10546
Sub-issue of #10533
## Scope
`TaskExecutionService` implements Zeta's dual-mode task execution: cooperative (work-stealing) for lightweight tasks and blocking (dedicated thread) for I/O-heavy tasks. Its inner classes — `CooperativeTaskWorker`, `RunBusWorkSupplier`, `BlockingWorker`, and `TaskGroupExecutionTracker` — implement this model but are entirely undocumented.
## File
`seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/TaskExecutionService.java`
## Methods to document
| Class / Method | Line | What to explain |
|----------------|------|-----------------|
| `submitThreadShareTask(...)` | 210 | Routes cooperative (non-blocking) tasks into the shared work-stealing queue |
| `submitBlockingTask(...)` | 235 | Launches a dedicated thread per blocking task; why blocking tasks must not share threads |
| `deployTask(TaskGroupImmutableInformation)` | 276 | Deserializes task group; loads connector classes; starts thread-share or blocking tasks based on task type |
| `notifyTaskStatusToMaster(...)` | 442 | Reports per-task status changes to `CoordinatorService` via Hazelcast operation |
| **`CooperativeTaskWorker`** (class) | 731 | Work-stealing cooperative executor; `exclusiveTaskTracker` for single-task phases; loop structure |
| `CooperativeTaskWorker.run()` | 753 | Task-stealing loop; transitions between exclusive and shared task execution; yield on empty queue |
| `RunBusWorkSupplier.runNewBusWork(boolean)` | 849 | Creates new `CooperativeTaskWorker` threads on demand when queue pressure is detected |
| `BlockingWorker.run()` | 667 | Dedicated-thread lifecycle: `init → call → done`; status notification on completion or exception |
| `TaskGroupExecutionTracker.taskDone(Task)` | 928 | All-tasks-complete detection (countdown latch pattern); triggers group-level completion and resource cleanup |
| `TaskGroupExecutionTracker.exception(Throwable)` | 901 | First-exception-wins: records the first failure and cancels all sibling tasks in the group |
## How to contribute
1. Fork the repo and create a branch
2. Add Javadoc to the methods above
3. Run `./mvnw spotless:apply` and `./mvnw -q -DskipTests verify`
4. Open a PR with title: `[Docs][Core] Add Javadoc to TaskExecutionService inner classes`
--
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: commits-unsubscribe@seatunnel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Docs][Core] Add Javadoc to TaskExecutionService inner classes (cooperative/blocking execution model) [seatunnel]
Posted by "DanielCarter-stack (via GitHub)" <gi...@apache.org>.
DanielCarter-stack commented on issue #10546:
URL: https://github.com/apache/seatunnel/issues/10546#issuecomment-3976713017
<!-- code-pr-reviewer -->
@luzhengchong I've reviewed the source code and can confirm this documentation task is well-defined and accurate.
The file `seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/TaskExecutionService.java` contains all the classes and methods listed in your issue:
- `CooperativeTaskWorker` (L731) - work-stealing execution for non-blocking tasks
- `BlockingWorker` (L656) - dedicated thread execution for blocking I/O tasks
- `RunBusWorkSupplier` (L838) - dynamic worker thread scaling
- `TaskGroupExecutionTracker` (L866) - task group lifecycle management
The dual execution model logic is confirmed at L372-399, where tasks are partitioned by `ThreadShareMode` (ALL/OFF/PART) into cooperative or blocking queues. However, the 8 methods you listed (including `submitThreadShareTask`, `deployTask`, `notifyTaskStatusToMaster`, and inner class methods) currently lack Javadoc.
This is a good `help wanted` issue for contributors to improve codebase understandability of Zeta engine's task scheduling mechanism.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Docs][Core] Add Javadoc to TaskExecutionService inner classes (cooperative/blocking execution model) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on issue #10546:
URL: https://github.com/apache/seatunnel/issues/10546#issuecomment-3976735518
> I've reviewed the source code and can confirm this documentation task is well-defined and accurate.
>
> The file `seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/TaskExecutionService.java` contains all the classes and methods listed in your issue:
>
> * `CooperativeTaskWorker` (L731) - work-stealing execution for non-blocking tasks
> * `BlockingWorker` (L656) - dedicated thread execution for blocking I/O tasks
> * `RunBusWorkSupplier` (L838) - dynamic worker thread scaling
> * `TaskGroupExecutionTracker` (L866) - task group lifecycle management
>
> The dual execution model logic is confirmed at L372-399, where tasks are partitioned by `ThreadShareMode` (ALL/OFF/PART) into cooperative or blocking queues. However, the 8 methods you listed (including `submitThreadShareTask`, `deployTask`, `notifyTaskStatusToMaster`, and inner class methods) currently lack Javadoc.
>
> This is a good `help wanted` issue for contributors to improve codebase understandability of Zeta engine's task scheduling mechanism.
Yes, please leave a message if anybody who'd like to implement it
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Docs][Core] Add Javadoc to TaskExecutionService inner classes (cooperative/blocking execution model) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo closed issue #10546: [Docs][Core] Add Javadoc to TaskExecutionService inner classes (cooperative/blocking execution model)
URL: https://github.com/apache/seatunnel/issues/10546
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org