gaozhangmin commented on a change in pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#discussion_r701842139



##########
File path: 
pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/TopicsImpl.java
##########
@@ -650,6 +650,51 @@ public void failed(Throwable throwable) {
         return future;
     }
 
+    @Override
+    public List<MessageId> terminatePartitionedTopic(String topic) throws 
PulsarAdminException {
+        try {
+            return 
terminatePartitionedTopicAsync(topic).get(this.readTimeoutMs, 
TimeUnit.MILLISECONDS);
+        } catch (ExecutionException e) {
+            throw (PulsarAdminException) e.getCause();
+        } catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
+            throw new PulsarAdminException(e);
+        } catch (TimeoutException e) {
+            throw new PulsarAdminException.TimeoutException(e);
+        }
+    }
+
+    @Override
+    public CompletableFuture<List<MessageId>> 
terminatePartitionedTopicAsync(String topic) {
+        TopicName tn = validateTopic(topic);
+
+        final CompletableFuture<List<MessageId>> future = new 
CompletableFuture<>();
+
+        try {
+            final WebTarget path = topicPath(tn, "terminate", "partitions");
+
+            request(path).async().post(Entity.entity("", 
MediaType.APPLICATION_JSON),

Review comment:
       resolved it




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