Skip to content

MINOR: Add generic config type to BrokerReconfigurable#22409

Open
unknowntpo wants to merge 1 commit into
apache:trunkfrom
unknowntpo:broker-reconfigurable-generics
Open

MINOR: Add generic config type to BrokerReconfigurable#22409
unknowntpo wants to merge 1 commit into
apache:trunkfrom
unknowntpo:broker-reconfigurable-generics

Conversation

@unknowntpo
Copy link
Copy Markdown
Contributor

@unknowntpo unknowntpo commented May 29, 2026

Summary

Make BrokerReconfigurable generic over the accepted AbstractConfig
type and update existing implementers accordingly.
With this PR, the component that implements BrokerReconfigurable can
decide the type of the config, and don't need type assertion to get the
actual type anymore.

Ref: #22353 (comment)
Reviewers: Ken Huang s7133700@gmail.com, Chia-Ping Tsai
chia7712@gmail.com

@github-actions github-actions Bot added triage PRs from the community core Kafka Broker storage Pull requests that target the storage module small Small PRs labels May 29, 2026
@unknowntpo unknowntpo marked this pull request as ready for review May 29, 2026 03:43
Copy link
Copy Markdown
Collaborator

@m1a2st m1a2st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

* </ol>
*/
public class LogCleaner implements BrokerReconfigurable {
public class LogCleaner implements BrokerReconfigurable<AbstractConfig> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From another perspective, we could move BrokerReconfigurable back to the server module, and then create server-only dynamic adapters for those classes located in non-server modules. The advantage is that BrokerReconfigurable could use AbstractKafkaConfig directly, which is simple and straightforward. The downside is that we need to create those adapters

@github-actions github-actions Bot removed the triage PRs from the community label May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved core Kafka Broker small Small PRs storage Pull requests that target the storage module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants