Flink: Add extensibility support to IcebergSink for downstream composition#15316
Open
herbherbherb wants to merge 1 commit intoapache:mainfrom
Open
Flink: Add extensibility support to IcebergSink for downstream composition#15316herbherbherb wants to merge 1 commit intoapache:mainfrom
herbherbherb wants to merge 1 commit intoapache:mainfrom
Conversation
ad6447e to
3e34caa
Compare
Open
3 tasks
Contributor
|
The general approach is first make your change to the current version (2.1), then once that is merged, cherry pick to the other supported versions (separate PRs for each version). |
Author
ack, thank you |
…ition (apache#15315) Add CommittableMetadata framework (marker interface, serializer, registry) allowing downstream to attach custom metadata to committables. Widen access modifiers on sink pipeline classes to enable downstream connector implementations to compose with Iceberg's existing sink infrastructure. All changes are additive with no behavioral changes to existing code paths.
3e34caa to
1c53254
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CommittableMetadataframework: a composition-based extension point allowing downstream toattach custom metadata to committables flowing through the sink pipeline
with (reference, wrap, delegate to) Iceberg's existing sink infrastructure
Resolves #15315.
Changes
New files (3, in both v2.0 and v2.1)
CommittableMetadata.java—Serializablemarker interface for custom metadataCommittableMetadataSerializer.java— serializer interface for metadataCommittableMetadataRegistry.java— global registry (downstream callsregister()beforesink creation)
Modified files (in both v2.0 and v2.1)
IcebergCommittable— public class, public accessors, optional@Nullable metadatafield,backward-compatible constructor chaining
IcebergCommittableSerializer— writes boolean metadata flag + delegates serializationIcebergCommitter— public class + constructorIcebergSinkWriter— public class + constructorIcebergWriteAggregator— public class + constructorIcebergSinkBuilder— public interfaceIcebergSink— protected constructor, protected getters, protectedBuilder()CachingTableSupplier— public class + constructorRowDataTaskWriterFactory— protected getters for spec/format/outputFileFactorySinkUtil— publiccheckAndGetEqualityFieldIds()Backward compatibility
IcebergCommittableconstructor chains withmetadata = null)Test plan
TestIcebergCommitterpassesTestIcebergSink*tests passdeserializes correctly