Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINOR: Adds possibility to use custom FilenameCreator #731

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gotpist1
Copy link

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 gotpist1 requested a review from a team as a code owner March 13, 2024 09:56
Copy link

cla-assistant bot commented Mar 13, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

cla-assistant bot commented Mar 13, 2024

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.

None yet

1 participant