apache/seatunnel

[Docs][Core] Add Javadoc to MultiTableWriterRunnable

Open

#10,538 opened on 2026年2月28日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)Java (1,432 forks)batch import
help wanted

Repository metrics

Stars
 (6,897 stars)
PR merge metrics
 (平均マージ 13d 21h) (30d で 143 merged PRs)

説明

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

  1. Fork the repo and create a branch
  2. Add Javadoc to the four methods above
  3. Run ./mvnw spotless:apply and ./mvnw -q -DskipTests verify
  4. Open a PR with title: [Docs][Core] Add Javadoc to MultiTableWriterRunnable

コントリビューターガイド