JooHyukKim commented on code in PR #20709:
URL: https://github.com/apache/pulsar/pull/20709#discussion_r1251462881


##########
pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/BrokersImpl.java:
##########
@@ -210,12 +210,13 @@ public void failed(Throwable throwable) {
     }
 
     @Override
-    public CompletableFuture<Void> shutDownBrokerGracefully(int 
maxConcurrentUnloadPerSec,
-                                                            boolean 
forcedTerminateTopic) {
+    public void shutDownBrokerGracefully(
+            int maxConcurrentUnloadPerSec, boolean forcedTerminateTopic
+    ) {
         WebTarget path = adminBrokers.path("shutdown")
                 .queryParam("maxConcurrentUnloadPerSec", 
maxConcurrentUnloadPerSec)
                 .queryParam("forcedTerminateTopic", forcedTerminateTopic);
-        return asyncPostRequest(path, Entity.entity("", 
MediaType.APPLICATION_JSON));
+        asyncPostRequest(path, Entity.entity("", 
MediaType.APPLICATION_JSON)).join();

Review Comment:
   @Technoboy- With the suggested changes, 
https://github.com/apache/pulsar/pull/20709#pullrequestreview-1512009365 did 
you mean simplify this code only, or the whole PR?  Because as discussed in 
https://github.com/apache/pulsar/pull/20651#discussion_r1250103544, I think 
it's better to maintain the async mechanism as a whole, like before.



-- 
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