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:11:28 UTC

[I] [Docs][Core] Add Javadoc to SinkFlowLifeCycle [seatunnel]

davidzollo opened a new issue, #10543:
URL: https://github.com/apache/seatunnel/issues/10543

   Sub-issue of #10533
   
   ## Scope
   
   `SinkFlowLifeCycle` is the runtime bridge between the Zeta engine and a connector's `SinkWriter`. It receives records and barriers from the upstream flow and manages `prepareCommit` / checkpoint state collection.
   
   ## File
   
   `seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/flow/SinkFlowLifeCycle.java`
   
   ## Methods to document
   
   | Method | What to explain |
   |--------|-----------------|
   | `init()` | Writer creation path: fresh writer via `createWriter` vs restored writer via `restoreWriter` when checkpoint states are present |
   | `received(Record<?>)` | Barrier vs data row dispatch; on data: calls `writer.write()`; on barrier: triggers `triggerBarrier` flow |
   | `triggerBarrier(Barrier)` | Calls `writer.prepareCommit()`; collects commit info and states; propagates barrier downstream; close-barrier handling |
   | `close()` | Ordered teardown: `writer.close()` then `committer.close()` if present; error logging |
   
   ## 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 SinkFlowLifeCycle`


-- 
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 SinkFlowLifeCycle [seatunnel]

Posted by "DanielCarter-stack (via GitHub)" <gi...@apache.org>.
DanielCarter-stack commented on issue #10543:
URL: https://github.com/apache/seatunnel/issues/10543#issuecomment-3976706209

   <!-- code-pr-reviewer -->
   This is a valid documentation improvement task. The `SinkFlowLifeCycle` class (seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/flow/SinkFlowLifeCycle.java) currently lacks Javadoc for its core methods, which is important for contributors understanding the Zeta engine's checkpoint and barrier alignment mechanisms.
   
   A few clarifications from the codebase:
   
   1. **`init()`** (lines 148-153) initializes serializers and the committer, but writer creation/restore actually happens in `restoreState()` (lines 325-350), not `init()`. The Javadoc should reflect this accurately.
   
   2. **`received(Record<?>)`** (lines 191-306) handles three types: barriers (triggering `prepareCommit()` and snapshot), `SchemaChangeEvent`, and data records (calling `writer.write()`). This is the core data flow entry point.
   
   3. **`close()`** (lines 173-177) calls `super.close()`, then `writer.close()`. Note that the current implementation does not call `committer.close()`, contrary to what the issue description suggests.
   
   4. **`triggerBarrier(Barrier)`** is referenced in the issue, but the actual barrier handling logic is inlined within `received()`, not a separate method.
   
   The task is suitable for new contributors. Please run `./mvnw spotless:apply` after adding Javadoc to ensure formatting compliance.


-- 
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 SinkFlowLifeCycle [seatunnel]

Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo closed issue #10543: [Docs][Core] Add Javadoc to SinkFlowLifeCycle
URL: https://github.com/apache/seatunnel/issues/10543


-- 
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