vinothchandar opened a new pull request, #19214:
URL: https://github.com/apache/hudi/pull/19214
### Describe the issue this Pull Request addresses
**DRAFT — CI shakeout for the hudi-common core/common split preparation;
will be broken into per-subpackage PRs after validation.**
Third round of the hudi-common package reorganization (#19192, #19193,
#19195): relocates the remaining domain-level machinery from
`org.apache.hudi.common.*` into `org.apache.hudi.core.*`, pre-staging the
future hudi-common(basic)/hudi-core module split so the eventual module move is
FQN-stable. No module structure changes.
### Summary and Changelog
Behavior-preserving package relocations only (~2,150 files, overwhelmingly
import churn). One commit per concern:
- `refactor(common)!`: transaction primitives → `core.transaction.*` —
`common.lock.{LockProvider, LockState}` → `core.transaction.lock` (joining the
InProcess/Noop providers); `common.conflict.detection` →
`core.transaction.conflict.detection`; `common.heartbeat.HoodieHeartbeatUtils`
→ `core.transaction.heartbeat`.
- `refactor(common)!`: table format SPI → `core.table.format` —
`HoodieTableFormat`/`NativeTableFormat` from the `o.a.h.common` package root;
the three in-repo `META-INF/services` registrations renamed to the new
interface FQN.
- `refactor(common)!`: `common.util` split into tiers — the 19
domain-dependent classes (ClusteringUtils, CompactionUtils, ConfigUtils,
SerializationUtils, MarkerUtils, HoodieCommonKryoRegistrar, et al.) →
`core.util`; generic substrate (Option, StringUtils, collections, clocks)
stays. The Kryo registrar's registration list is byte-identical — registration
order derives persisted class IDs (v2 delete blocks in log files, Flink
coordinator checkpoint state) and is treated as a storage contract.
- `refactor(common)!`: file group reader → `core.read` — `common.table.read`
(incl. `buffer/`, `lsm/`) joins `BaseHoodieTableFileIndex`.
- `refactor(common)!`: table domain → `core.table` —
`HoodieTableMetaClient`, `HoodieTableConfig`, timeline (versioning/dto), view,
log, cdc, checkpoint, plus the common-root strays (`HoodieCleanStat`,
`HoodieRollbackStat`, `HoodiePendingRollbackInfo`) and the three
metaserver-client classes residing in these packages (their reflective-load
literals rewritten in the same commit).
Deliberately left in place: `common.table.log.InstantRange` (Java-serialized
into Flink checkpoint splits state via `MergeOnReadInputSplit`; moving it
breaks savepoint restore — stays until Flink split-state serialization is
reworked), all payload classes incl. `HoodieJsonPayload` (table-persisted
FQNs), `o.a.h.metadata`, `avro.model`, keygen. No code was copied.
### Impact
No config keys, defaults, or semantics change. No storage-format impact,
verified per move: commit-metadata JSON has no polymorphic typing (no class
names persisted); streamer/structured-streaming checkpoint keys and values are
plain strings; timeline plan/metadata files are `avro.model`; the persisted
`hoodie.table.format` value is a name, never a class; Kryo bytes on storage are
registration-ID-based and the registration order is untouched.
Breaking (source/binary) for externally compiled code importing the moved
classes — always failing loudly, fixed by import updates. Widest surfaces:
`HoodieTableMetaClient`/`HoodieTimeline`/`HoodieInstant` (connectors, tooling),
custom `LockProvider` implementations, external `HoodieTableFormat`
implementations (must also rename their `META-INF/services` file). Users
configuring Hudi via `hoodie.*` properties see zero impact:
lock/conflict-detection configs name implementation classes which keep their
FQNs, and nothing lock-related is table-persisted. Release-note item: legacy
Spark DStream checkpoints that Java-serialized closures capturing Hudi classes
cannot restore across any class relocation. hudi-trino-plugin untouched. No
performance impact.
### Risk Level
low — mechanical relocations gated by a disk-serialization audit (Jackson
typing, Java serialization to storage, Kryo persistence, checkpoint contents)
with frozen anchors for every class that serializes to disk. Verification: full
52-module reactor green (`-Dspark4.1 -Dflink2.1`, checkstyle/scalastyle
enforced); metaserver server+client compiled (dockerized thrift codegen);
hudi-integ-test + bundle compiled; 25 test suites pass across every moved area
(locks/transaction/heartbeat, meta client, table config, all util suites,
buffered records, file-system views, log format, timeline, checkpoints, Spark
file-group reader). Two local-only test failures reproduce identically on the
unmodified merge base (timezone-dependent instant parsing; avro LocalDate
logical-type cast) — environmental, pre-existing.
### Documentation Update
none — no config keys or defaults change.
### Contributor's checklist
- [x] Read through [contributor's
guide](https://hudi.apache.org/contribute/how-to-contribute)
- [x] Enough context is provided in the sections above
- [x] Adequate tests were added if applicable
--
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]