apache/seatunnel

[Docs][Core] Add Javadoc to MultiTableWriterRunnable

Open

#10,538 建立於 2026年2月28日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)Java (1,432 fork)batch import
help wanted

倉庫指標

Star
 (6,897 star)
PR 合併指標
 (平均合併 13天 21小時) (30 天內合併 143 個 PR)

描述

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

貢獻者指南