[improve][io] KCA: option to collapse partitioned topics#19923
Merged
eolivelli merged 2 commits intoapache:masterfrom Mar 29, 2023
Merged
[improve][io] KCA: option to collapse partitioned topics#19923eolivelli merged 2 commits intoapache:masterfrom
eolivelli merged 2 commits intoapache:masterfrom
Conversation
eolivelli
approved these changes
Mar 26, 2023
Contributor
eolivelli
left a comment
There was a problem hiding this comment.
Overall LGTM
I have left some small comments
|
|
||
| if (collapsePartitionedTopics | ||
| && sourceRecord.getTopicName().isPresent() | ||
| && TopicName.get(sourceRecord.getTopicName().get()).isPartitioned()) { |
Contributor
There was a problem hiding this comment.
Nit: we an save some work by calling TopicName.get only once
Contributor
Author
There was a problem hiding this comment.
TopicName.get caches internally and this way I don't need to deal with "if not partitioned" case (and don't have to call it if collapsePartitionedTopics is disabled)
...t-adaptor/src/main/java/org/apache/pulsar/io/kafka/connect/PulsarKafkaConnectSinkConfig.java
Outdated
Show resolved
Hide resolved
dlg99
added a commit
that referenced
this pull request
Mar 29, 2023
(cherry picked from commit 7cb48fd)
dlg99
added a commit
to datastax/pulsar
that referenced
this pull request
Mar 29, 2023
(cherry picked from commit 7cb48fd)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Work-around for #19922 for KCA-based sinks.
Modifications
Option to collapse topic name with "-partition-" and pass it to Kafka connector.
Verifying this change
This change added unit tests.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: dlg99#13