-
Notifications
You must be signed in to change notification settings - Fork 18
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
Configure s3 api to use AWS Prefix #370
Configure s3 api to use AWS Prefix #370
Conversation
aindriu-aiven
commented
Dec 11, 2024
•
edited
Loading
edited
- This update means we can now use the PREFIX in the AWS API allowing users to configure it to be more specific about what they want processed by the connector.
Signed-off-by: Aindriu Lavelle <aindriu.lavelle@aiven.io>
2a67cc2
to
071992d
Compare
Signed-off-by: Aindriu Lavelle <aindriu.lavelle@aiven.io>
071992d
to
95835f1
Compare
s3-source-connector/src/main/java/io/aiven/kafka/connect/s3/source/utils/AWSV2SourceClient.java
Show resolved
Hide resolved
@@ -337,13 +339,18 @@ private static byte[] generateNextAvroMessagesStartingFromId(final int messageId | |||
} | |||
|
|||
private static String writeToS3(final String topicName, final byte[] testDataBytes, final String partitionId) { | |||
final String objectKey = topicName + "-" + partitionId + "-" + System.currentTimeMillis() + ".txt"; | |||
final String objectKey = addPrefixOrDefault("") + topicName + "-" + partitionId + "-" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a prefix to any one of the integration tests and assert for count ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The prefix was previously added in the config for the integration tests, but not being used. We are actually using the prefix correctly in our integration tests now.
Signed-off-by: Aindriu Lavelle <aindriu.lavelle@aiven.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM