apache/seatunnel
View on GitHub[Docs][Core] Add Javadoc to MultiTableWriterRunnable
Open
#10538 opened on Feb 28, 2026
help wanted
Description
Sub-issue of #10533
Scope
MultiTableWriterRunnable is the async worker that drains a BlockingQueue<SeaTunnelRow> and dispatches rows to per-table SinkWriter instances. It has no method-level Javadoc despite containing subtle concurrency and schema-evolution logic.
File
seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/multitablesink/MultiTableWriterRunnable.java
Methods to document
| Method | Line | What to explain |
|---|---|---|
| Constructor | 37 | tableWriterMap keyed by tableIdentifier string; queue ownership (each runnable owns exactly one BlockingQueue) |
run() |
45 | Infinite loop draining the queue; row.getArity() == 0 as control signal for schema-evolution events; synchronized(this) block ensures snapshotState cannot run concurrently with an active write |
getThrowable() |
91 | Returns first unhandled exception from the run loop; null means the worker is healthy; checked by MultiTableSinkWriter.subSinkErrorCheck() |
getCurrentTableId() |
95 | Diagnostic field: the tableId of the row currently being written; may be null or stale between rows |
How to contribute
- Fork the repo and create a branch
- Add Javadoc to the four methods above
- Run
./mvnw spotless:applyand./mvnw -q -DskipTests verify - Open a PR with title:
[Docs][Core] Add Javadoc to MultiTableWriterRunnable