cckellogg commented on a change in pull request #11763:
URL: https://github.com/apache/pulsar/pull/11763#discussion_r695245092



##########
File path: 
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java
##########
@@ -345,11 +345,18 @@ void run() throws PulsarAdminException {
     private class PartitionedLookup extends CliCommand {
         @Parameter(description = 
"persistent://tenant/namespace/partitionedTopic", required = true)
         private java.util.List<String> params;
+        @Parameter(names = { "-s",
+                                "--sort-by-broker" }, description = "Sort 
partitioned-topic by Broker Url")
+        private boolean sortByBroker = false;
 
         @Override
         void run() throws PulsarAdminException {
             String topic = validateTopicName(params);
-            print(getAdmin().lookups().lookupPartitionedTopic(topic));
+            if (sortByBroker) {
+                
print(getAdmin().lookups().lookupPartitionedTopicSortByBroker(topic));

Review comment:
       Instead of adding a new method and api can the sorting just be done here 
or in a helper method in the CmdTopics?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to