Skip to content

Flink Sink V2: Add PostCommitHook plugin interface#15769

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

Flink Sink V2: Add PostCommitHook plugin interface#15769
herbherbherb wants to merge 1 commit intoapache:mainfrom
herbherbherb:flink-sink-post-commit-hook

Conversation

@herbherbherb
Copy link
Copy Markdown

Summary

Adds a PostCommitHook plugin interface to IcebergSink that is invoked after each successful Iceberg commit. This enables use cases like updating table properties with watermark metadata, triggering notifications, recording metrics, or synchronizing external metadata stores.

Resolves #15768.

Changes

  • New: PostCommitHook.java -- @FunctionalInterface with a single method: void afterCommit(long snapshotId, Map<String, String> summary)
  • Modified: IcebergCommitter -- accepts optional hook, invokes it after successful commit
  • Modified: IcebergSink.Builder -- new postCommitHook() method, passed through to committer

Compatibility

  • No behavioral change when the hook is not set (null default)
  • No changes to public API signatures of existing methods
  • Fully backward compatible

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 Sink V2: Add PostCommitHook plugin interface

1 participant