sundapeng opened a new pull request, #7722:
URL: https://github.com/apache/paimon/pull/7722
## Summary
- Introduce a typed `HadoopOptionsProvider` interface in `paimon-common` so
format modules (Lance, Vortex) can pull hadoop-style fs options from a `FileIO`
without `Class.forName` + reflective `Method.invoke`.
- Implement it on `HadoopFileIO`, `OSSFileIO`, `JindoFileIO`, and
`PluginFileIO`. The `LanceUtils` / `VortexUtils` dispatch collapses from three
branches (per-class reflection lookups) to a single `instanceof` check plus a
fallback.
- Split `VortexUtils.toVortexSpecified` into `toVortexSpecifiedForReader` /
`toVortexSpecifiedForWriter`, mirroring `LanceUtils`. The previous single entry
always picked `"read"` semantics; under the old reflection it was already
silently calling the no-arg `hadoopOptions()` overload on `JindoFileIO` and
therefore never picked up the `jindocache` read/write configuration.
## Why
Lance and Vortex format modules cannot depend on `paimon-jindo` or
`paimon-oss-impl` directly (those filesystems are optional plugins), so they
reached for hadoop-style options via reflection. The reflection silently masks
signature drift, and the dispatch grew an `else if` arm for every new FileIO
implementation.
A typed capability interface is checked at compile time, eliminates the
`static { Class.forName(...) }` blocks, and consolidates all FileIO-to-options
mappings under one contract.
## Test plan
- [ ] `mvn -pl
paimon-common,paimon-filesystems/paimon-oss-impl,paimon-filesystems/paimon-jindo,paimon-filesystems/paimon-jindodls,paimon-lance,paimon-vortex/paimon-vortex-format
-am compile`
- [ ] `mvn -pl
paimon-filesystems/paimon-oss-impl,paimon-filesystems/paimon-jindo,paimon-filesystems/paimon-jindodls,paimon-vortex/paimon-vortex-format
test`
- [ ] `mvn -pl paimon-lance test` (3 pre-existing native-layer
`BtreeGlobalIndex` failures unrelated to this PR; same on master)
🤖 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]