MoR support for the standalone Java client (new HoodieJavaReadClient) #19798
ravjot28
started this conversation in
New Feature Ideas
Replies: 1 comment 1 reply
|
Thanks for starting this @ravjot28 . Wonder if we can do this based on the new 1.x RecordMerger APIs. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Motivation
The Java engine (
hudi-java-client) today ships onlyHoodieJavaWriteClientandHoodieJavaTableServiceClient. There is no read client, and MERGE_ON_READ tables can't be completed end-to-end from a plain Java application - no compaction execution and no MoR reads. Spark and Flink both have full MoR support; embedded Java users have none.I have a working implementation on my fork (full CI matrix green) and would like feedback on scope and API shape before opening PRs.
What's implemented
1. New
HoodieJavaReadClient(Java engine):HoodieFileGroupReaderper file slice (base file merged with log files), exposed as a lazily-chainedClosableIterator→ bounded memory.populate.meta.fields=falseunsupported for completion-time filtering, noInternalSchemaevolution reconciliation, no CDC.2. MoR write-side completion: delta commit + compaction action executor wiring so Java writers run compaction end-to-end.
3. Bucket index for the Java engine:
JavaBucketIndexPartitioner, bulk-insert partitioner, index factory + layout-config wiring.4.
BaseAvroPayloaddecode fix (hudi-common):getRecord(schema)now resolves by name from the true writer schema for projection schemas (fixes a pre-existing bug where merges against persisted data silently nulled data fields). Evolution-shaped schemas (renames/adds) keep the legacy positional decode the Hive/Presto MoR readers depend on; unresolvable fields with no default fail loudly withAvroTypeException. This touches the shared merge path for all engines → planned as a separate, first PR with risk called out.Testing
hudi-hadoop-mrrealtime suites.Proposed plan
type:featureissue (+ sub-issues) and open three PRs:fix(common): resolve payload decode by name for projection schemasfeat(client): add HoodieJavaReadClient with MoR supportfeat(client): support bucket index for the Java engineQuestions for the community
Code: master...ravjot28:hudi:master
All reactions