vinishjail97 opened a new pull request, #839:
URL: https://github.com/apache/incubator-xtable/pull/839

   ## What is the purpose of the pull request
   
   Second of two PRs splitting #837 into **packaging** and **listener**. This 
is the **listener** PR, **stacked on the packaging PR #838** — review/merge 
#838 first. (Until #838 merges, the diff here shows both; it'll reduce to just 
the listener once #838 lands and this rebases.)
   
   Adds the driver-side listener that runs an incremental 
`ConversionController.sync(...)` in-job after a successful write, activated via 
`spark.xtable.*` config only.
   
   ## Brief change log
   
   - `XTableSparkConfig` — parse `spark.xtable.*` into `TableSyncSpec` (path- 
and name-based table selection).
   - `PlanTargetResolver` — best-effort write-path extraction from the analyzed 
plan.
   - `XTableSyncListener` — **stateless, synchronous** 
`QueryExecutionListener`: syncs inline on a recognized write matching a 
configured table; single-flight is inherent (single-threaded 
`LiveListenerBus`); per-table failures caught as `Throwable` so a listener 
never destabilizes the bus.
   - Reuses `TableSyncSpec` / `XTableSyncService` from #838.
   
   ### Usage
   ```
   spark-submit --packages 
<hudi>,<iceberg>,<delta>,org.apache.xtable:xtable-spark-runtime_2.12:<ver> \
     --conf 
spark.sql.queryExecutionListeners=org.apache.xtable.spark.XTableSyncListener \
     --conf spark.xtable.tables=orders \
     --conf spark.xtable.orders.basePath=/warehouse/db/orders \
     --conf spark.xtable.orders.sourceFormat=HUDI \
     --conf spark.xtable.orders.targets=ICEBERG,DELTA
   ```
   
   ## Verify this pull request
   
   Unit tests (`TestXTableSparkConfig`, `TestPlanTargetResolver`, 
`TestXTableSyncListener`) + `ITXTableSyncListener` (embedded `local[*]`: a Hudi 
datasource write triggers the listener and syncs to Delta + Iceberg in-JVM, 
asserting the `id` sets match across all three formats).
   
   ```
   SPARK_LOCAL_IP=127.0.0.1 mvn -pl xtable-spark-runtime -am verify
   ```
   
   Part of #836.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to