-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Issue 14013] Make PersistentTopics#getPartitionedTopicList to pure async.
#14059
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
[Issue 14013] Make PersistentTopics#getPartitionedTopicList to pure async.
#14059
Conversation
|
@codelipenghui @eolivelli @Technoboy- @Jason918 @shoothzj @RobertIndie @nodece PTAL, when you have time. :) |
PersistentTopics#getPartitionedTopicList to pure async.
| } | ||
| return getPartitionedTopicList(TopicDomain.getEnum(domain())); | ||
| protected CompletableFuture<List<String>> internalGetPartitionedTopicList() { | ||
| return validateNamespaceOperationAsync(namespaceName, NamespaceOperation.GET_TOPICS) |
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 check namespaceExistsAsync before validateNamespaceOperationAsync
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopics.java
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/PersistentTopics.java
Show resolved
Hide resolved
| .get(config().getZooKeeperOperationTimeoutSeconds(), TimeUnit.SECONDS); | ||
| topics.addAll(getPartitionedTopicList(TopicDomain.persistent)); | ||
| topics.addAll(getPartitionedTopicList(TopicDomain.non_persistent)); | ||
| .get(timeoutSeconds, TimeUnit.SECONDS); |
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.
Not async?
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 is not the focus of this refactoring, it just affects here. And will keep the original code logic.
Master Issue: #14013
Motivation
Make Rest API
getPartitionedTopicListto async and to refactor code style to make it more clear.Modifications
getPartitionedTopicListmethod from sync to async.Verifying this change
Documentation
none.
Need to update docs?
no-need-doc