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

fix: include 'ksql.streams.topic.*' prefix properties on LIST PROPERTIES output #6753

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

spena
Copy link
Member

@spena spena commented Dec 9, 2020

Description

Fixes #6734

Includes ksql.streams.topic.* prefixed properties into the LIST PROPERTIES output.

ksql> list properties;
...        
ksql.streams.topic.min.insync.replicas                 | KSQL  | SERVER           | 1        
...

It also allows users to set the ksql.streams.topic.* properties from the CLI.

Testing done

Added unit tests
Verified manually

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@spena spena added the bug label Dec 9, 2020
@spena spena requested a review from a team December 9, 2020 22:24
Copy link
Contributor

@agavra agavra left a comment

Choose a reason for hiding this comment

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

LGTM!

private static Set<String> streamTopicConfigNames() {
final ImmutableSet.Builder<String> configs = ImmutableSet.builder();

Arrays.stream(TopicConfig.class.getDeclaredFields())
Copy link
Contributor

Choose a reason for hiding this comment

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

heh.. this is a neat trick. I guess there's no other option to get these configs without reflection and just manually adding them?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right. I was thinking of manually creating the list, but TopicConfig can change in the future, and we'll have to adjust every time it changes. I'm not a fan of reflection, but I like the magic on it. This magic helps to forget about changes in TopicConfig as long as they stay public.

@spena spena merged commit 8071af2 into confluentinc:master Dec 10, 2020
@spena spena deleted the fix_topic_props_on_list branch December 10, 2020 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set and list against ksql.streams.topic.* prefixed properties is not working
2 participants