Skip to content

Flink: Add extensibility support to IcebergSink for downstream composition#15316

Open
herbherbherb wants to merge 1 commit intoapache:mainfrom
herbherbherb:flink-sink-extensibility
Open

Flink: Add extensibility support to IcebergSink for downstream composition#15316
herbherbherb wants to merge 1 commit intoapache:mainfrom
herbherbherb:flink-sink-extensibility

Conversation

@herbherbherb
Copy link

Summary

  • Add CommittableMetadata framework: a composition-based extension point allowing downstream to
    attach custom metadata to committables flowing through the sink pipeline
  • Widen access modifiers on sink classes to enable downstream connector implementations to compose
    with (reference, wrap, delegate to) Iceberg's existing sink infrastructure

Resolves #15315.

Changes

New files (3, in both v2.0 and v2.1)

  • CommittableMetadata.javaSerializable marker interface for custom metadata
  • CommittableMetadataSerializer.java — serializer interface for metadata
  • CommittableMetadataRegistry.java — global registry (downstream calls register() before
    sink creation)

Modified files (in both v2.0 and v2.1)

  • IcebergCommittable — public class, public accessors, optional @Nullable metadata field,
    backward-compatible constructor chaining
  • IcebergCommittableSerializer — writes boolean metadata flag + delegates serialization
  • IcebergCommitter — public class + constructor
  • IcebergSinkWriter — public class + constructor
  • IcebergWriteAggregator — public class + constructor
  • IcebergSinkBuilder — public interface
  • IcebergSink — protected constructor, protected getters, protected Builder()
  • CachingTableSupplier — public class + constructor
  • RowDataTaskWriterFactory — protected getters for spec/format/outputFileFactory
  • SinkUtil — public checkAndGetEqualityFieldIds()

Backward compatibility

  • All existing constructors still work (new IcebergCommittable constructor chains with
    metadata = null)
  • Serialization is backward-compatible (boolean flag distinguishes metadata presence)
  • No behavioral changes to any existing code path

Test plan

  • Existing TestIcebergCommitter passes
  • Existing TestIcebergSink* tests pass
  • Serialization backward compatibility: old serialized data (no metadata flag) still
    deserializes correctly

@bryanck
Copy link
Contributor

bryanck commented Feb 13, 2026

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).

@herbherbherb
Copy link
Author

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).

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.
@herbherbherb herbherbherb force-pushed the flink-sink-extensibility branch from 3e34caa to 1c53254 Compare February 13, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flink: Add extensibility support to IcebergSink for downstream connector implementations

2 participants