Skip to content

MINOR: Adds possibility to use custom FilenameCreator#731

Open
Pierre Stridsberg (gotpist1) wants to merge 1 commit into
confluentinc:masterfrom
gotpist1:feature/add-filename-creator
Open

MINOR: Adds possibility to use custom FilenameCreator#731
Pierre Stridsberg (gotpist1) wants to merge 1 commit into
confluentinc:masterfrom
gotpist1:feature/add-filename-creator

Conversation

@gotpist1

Copy link
Copy Markdown

Problem

When writing to S3 there is no possibility to decide on the actual filename that ends up in the bucket. Sometimes, we want to be able to do this to make it more clear on what the file contains and to have more control.
I have described it in this: #631 issue

Solution

I have added an interface called FilenameCreator. This interface can be implemented on a custom class and added as config. If none is provided we fall back to TopicPartitionFilenameCreator that preserves the way that file names where created before this change. So no breaking changes.

Does this solution apply anywhere else?
  • [x ] yes
  • no
If yes, where?

TopicPartitionWriter now uses a fileName creator, but the change does not affect previous behaviour.
S3SinkConnectorConfig now has a new key: s3.filename.creator.class for specifying your own FilenameCreator

Test Strategy

Changed existing tests to use new FilenameCreator

Testing done:
  • [ x] Unit tests
  • [ x] Integration tests
  • System tests
  • [x ] Manual tests

Release Plan

Merging to master

@gotpist1 Pierre Stridsberg (gotpist1) requested a review from a team as a code owner March 13, 2024 09:56
@cla-assistant

cla-assistant Bot commented Mar 13, 2024

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cla-assistant

cla-assistant Bot commented Mar 13, 2024

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant