Skip to content

Flink Sink V2: Add OutputFileFactoryProvider plugin interface#15764

Open
herbherbherb wants to merge 1 commit intoapache:mainfrom
herbherbherb:flink-sink-output-file-factory-provider
Open

Flink Sink V2: Add OutputFileFactoryProvider plugin interface#15764
herbherbherb wants to merge 1 commit intoapache:mainfrom
herbherbherb:flink-sink-output-file-factory-provider

Conversation

@herbherbherb
Copy link
Copy Markdown

Summary

Adds an OutputFileFactoryProvider plugin interface to IcebergSink that allows external implementations to customize how OutputFileFactory instances are created. This enables use cases like custom file naming, path rewriting, or alternative storage routing without subclassing internal writer factories.

Resolves #15763.

Changes

  • New: OutputFileFactoryProvider.java -- @FunctionalInterface with a single method: OutputFileFactory create(Table, int taskId, int attemptId, FileFormat, PartitionSpec)
  • Modified: RowDataTaskWriterFactory -- accepts optional provider, uses it in initialize() when present
  • Modified: IcebergSink.Builder -- new outputFileFactoryProvider() method, passed through to writer factory

Compatibility

  • No behavioral change when the provider 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 OutputFileFactoryProvider plugin interface

1 participant