-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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: Remove deprecated constructors from Connect's Kafka*BackingStore classes #15865
MINOR: Remove deprecated constructors from Connect's Kafka*BackingStore classes #15865
Conversation
Context - #13434 (comment) |
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.
@yashmayya thanks for this patch. LGTM. just one small comment
@@ -160,7 +155,7 @@ public KafkaStatusBackingStore(Time time, Converter converter, Supplier<TopicAdm | |||
|
|||
// visible for testing | |||
KafkaStatusBackingStore(Time time, Converter converter, String statusTopic, KafkaBasedLog<String, byte[]> kafkaLog) { | |||
this(time, converter); | |||
this(time, converter, null, "connect-distributed-"); |
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.
This constructor is used by testing. It set topicAdminSupplier
to null, so we have to handle the "null" topicAdminSupplier
just for testing. That is a bit awkward to me. Could we require those test cases pass a topicAdminSupplier
instead of null
? Those tests can pass a fake topicAdminSupplier
to constructor if they expect topicAdminSupplier
should not be called in testing.
Line 137 in 25118ce
Supplier<TopicAdmin> adminSupplier = () -> { |
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.
Yeah, that's a good point. I think this and the "ownTopicAdmin
" are cruft left over from earlier refactors and are definitely no longer used anywhere in Connect itself (or MM2). Since these aren't part of Connect's public API, I think we should be fine with removing them.
@yashmayya any update? I'm ok to merge it and open follow-up to address remaining comments. |
2631cc6
to
96c9f66
Compare
…wnTopicAdmin' cruft from Kafka*BackingStore classes
96c9f66
to
73d82d0
Compare
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.
Apologies for the delay, and thanks for following up @chia7712.
@@ -160,7 +155,7 @@ public KafkaStatusBackingStore(Time time, Converter converter, Supplier<TopicAdm | |||
|
|||
// visible for testing | |||
KafkaStatusBackingStore(Time time, Converter converter, String statusTopic, KafkaBasedLog<String, byte[]> kafkaLog) { | |||
this(time, converter); | |||
this(time, converter, null, "connect-distributed-"); |
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.
Yeah, that's a good point. I think this and the "ownTopicAdmin
" are cruft left over from earlier refactors and are definitely no longer used anywhere in Connect itself (or MM2). Since these aren't part of Connect's public API, I think we should be fine with removing them.
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
…re classes (apache#15865) - These constructors were deprecated over 3 years ago in KAFKA-10021: Changed Kafka backing stores to use shared admin client to get end offsets and create topics apache#9780. - While these classes are not a part of Connect's public API, deprecation was still introduced instead of outright removal because they are useful utility classes that might've been used outside of Connect. - The KafkaOffsetBackingStore's deprecated constructor was removed in KAFKA-14785: Connect offset read REST API apache#13434. - This patch removes the deprecated constructors for KafkaConfigBackingStore and KafkaStatusBackingStore. Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
KafkaOffsetBackingStore
's deprecated constructor was removed in KAFKA-14785: Connect offset read REST API #13434.KafkaConfigBackingStore
andKafkaStatusBackingStore
.