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


##########
pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/BrokersImpl.java:
##########
@@ -215,7 +215,13 @@ public CompletableFuture<Void> 
shutDownBrokerGracefully(int maxConcurrentUnloadP
         WebTarget path = adminBrokers.path("shutdown")
                 .queryParam("maxConcurrentUnloadPerSec", 
maxConcurrentUnloadPerSec)
                 .queryParam("forcedTerminateTopic", forcedTerminateTopic);
-        return asyncPostRequest(path, Entity.entity("", 
MediaType.APPLICATION_JSON));
+        CompletableFuture<Void> completableFuture = new CompletableFuture<>();
+        try {
+            sync(() -> asyncPostRequest(path, Entity.entity("", 
MediaType.APPLICATION_JSON)));

Review Comment:
   @315157973 I am concern that such configuration to allow async invocation 
will have less control of "how" the graceful shutdown work. 



##########
pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/BrokersImpl.java:
##########
@@ -215,7 +215,13 @@ public CompletableFuture<Void> 
shutDownBrokerGracefully(int maxConcurrentUnloadP
         WebTarget path = adminBrokers.path("shutdown")
                 .queryParam("maxConcurrentUnloadPerSec", 
maxConcurrentUnloadPerSec)
                 .queryParam("forcedTerminateTopic", forcedTerminateTopic);
-        return asyncPostRequest(path, Entity.entity("", 
MediaType.APPLICATION_JSON));
+        CompletableFuture<Void> completableFuture = new CompletableFuture<>();
+        try {
+            sync(() -> asyncPostRequest(path, Entity.entity("", 
MediaType.APPLICATION_JSON)));

Review Comment:
   @315157973 I am concerned that such configuration to allow async invocation 
will have less control of "how" the graceful shutdown work. 



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