Skip to content

[Docs][Core] Add Javadoc to TaskExecutionService inner classes#10691

Open
xxzuo wants to merge 4 commits into
apache:devfrom
xxzuo:doc_task_execution_service
Open

[Docs][Core] Add Javadoc to TaskExecutionService inner classes#10691
xxzuo wants to merge 4 commits into
apache:devfrom
xxzuo:doc_task_execution_service

Conversation

@xxzuo
Copy link
Copy Markdown
Contributor

@xxzuo xxzuo commented Apr 1, 2026

Fixes: #10546

Purpose of this pull request

This pull request adds comprehensive Javadoc documentation to TaskExecutionService class, which is part of issue #10546 (sub-task of #10533) to add Javadoc to key lifecycle, checkpoint, and multi-table related classes.

The Javadoc improvements include:

1. Class-level Javadoc:

  • Expanded description with <ul> lists detailing the service responsibilities
  • Added @see references to related internal classes (CooperativeTaskWorker, BlockingWorker, TaskGroupExecutionTracker)

2. Field Javadoc:

  • Added documentation for all key fields including hzInstanceName, nodeEngine, classLoaderService, executorService, executionContexts, finishedExecutionContexts, etc.

3. Method Javadoc:

  • Added/enhanced Javadoc for public methods: start(), shutdown(), getExecutionContext(), getActiveExecutionContext(), deployTask(), deployLocalTask(), getTask(), cancelTaskGroup(), asyncExecuteFunction(), notifyCleanTaskGroupContext(), reportEvent(), getSeaTunnelConfig(), getServerConnectorPackageClient(), printTaskExecutionRuntimeInfo()
  • Added Javadoc for private methods: submitThreadShareTask(), submitBlockingTask(), notifyTaskStatusToMaster()

4. Inner Class Javadoc:

  • CooperativeTaskWorker - improved class documentation
  • CooperativeTaskWorker.run() - added detailed execution flow with <ol> list
  • RunBusWorkSupplier - improved class and method documentation
  • BlockingWorker.run() - added detailed execution flow with <ol> list
  • TaskGroupExecutionTracker.taskDone() - added completion handling documentation
  • TaskGroupExecutionTracker.exception() - added exception recording documentation
  • BlockingTaskThreadFactory - added thread naming pattern documentation
  • NamedTaskWrapper - added documentation

Does this PR introduce any user-facing change?

No. This is a documentation-only change that adds Javadoc comments to improve code readability and maintainability. No user-facing behavior is changed.

How was this patch tested?

  • ./mvnw spotless:apply passed (formatting verified)
  • Documentation-only change

Check list

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds comprehensive Javadoc to TaskExecutionService (SeaTunnel Engine server) to clarify task deployment, lifecycle management, and the cooperative vs. blocking execution model, as part of issue #10546.

Changes:

  • Expanded class-level documentation describing responsibilities and execution modes.
  • Added/updated Javadoc on key fields and public/private methods.
  • Added detailed Javadoc for inner classes involved in cooperative and blocking execution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@DanielLeens DanielLeens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pulled the diff locally and did not find a blocking issue here.

This stays in the documentation/Javadoc layer, and the added descriptions are aligned with the current execution structure in TaskExecutionService rather than changing behavior. From my side this looks fine to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs][Core] Add Javadoc to TaskExecutionService inner classes (cooperative/blocking execution model)

4 participants