-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[pulsar-broker] support to get list of topics under a namespace bundle #12632
Conversation
@rdhabalia:Thanks for your contribution. For this PR, do we need to update docs? |
f3b451c
to
8a35c6f
Compare
@rdhabalia do we need to add docs here? |
* @throws PulsarAdminException | ||
* Unexpected error | ||
*/ | ||
List<String> getList(String namespace, String bundle, TopicDomain topicDomain) throws PulsarAdminException; |
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.
Suggests to provide the corresponding getListAsync
method like the others?
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.
How about introducing a GetListOption? we might want to add more params in the future, this will make the API looks very bloated
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.
added getListAsync
with param map for future extension.
@@ -889,7 +889,7 @@ public void topics() throws Exception { | |||
verify(mockTopics).revokePermissions("persistent://myprop/clust/ns1/ds1", "admin"); | |||
|
|||
cmdTopics.run(split("list myprop/clust/ns1")); | |||
verify(mockTopics).getList("myprop/clust/ns1", null); | |||
verify(mockTopics).getList("myprop/clust/ns1", null, null); |
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.
It's better to keep the previous code line as the interface is not removed.
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.
we are not removing the code but CLI admin list
command now uses the new interface which this test is validating.
* @throws PulsarAdminException | ||
* Unexpected error | ||
*/ | ||
List<String> getList(String namespace, TopicDomain topicDomain, Map<String, Object> params) |
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.
IMHO, It's a little confusing to add params
here. It's easy for coding, but not so easy for user to understand how to use this.
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.
yes, added an enum to use query param for usability.
3e08154
to
6867253
Compare
@eolivelli @Jason918 PTAL. |
ping |
this PR again has conflicts. can we please review and merge the PR. |
@Jason918 Please help review the PR again. |
@rdhabalia Please help resolve the conflicts so that we can merge this PR. |
@Jason918 I have resolved the conflicts, please review again. |
/pulsarbot run-failure-checks |
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.
Good job!
/pulsarbot run-failure-checks |
@rdhabalia Could you please help check the failed test? Looks like related to this PR. |
0b51aaf
to
91e26b8
Compare
add param methods add query param enum
91e26b8
to
af9fc87
Compare
apache#12632) add param methods add query param enum
Motivation
Right now, broker-admin api allows user to get list of topics under a namespace but sometime user also needs a list of topics under a given namespace bundle. so, add support to fetch list of topics under a namespace
Modificaiton
Result