You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/02 06:56:02 UTC

[GitHub] [pulsar] gaozhangmin opened a new pull request #11893: Admin cli support terminate a partitioned topic

gaozhangmin opened a new pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893


   
   
   ### Motivation
   
   
   Now, Admin cli only support a non-partitioned topic, But In actually, I usually want to terminate the whole topic, instead of one partition of topic.
   ### Modifications
   
   add  admin command `partitioned-terminate`, support terminate whole topic without specify partition.
   
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (yes / no) no
     - The public API: (yes / no) yes
     - The schema: (yes / no / don't know) no
     - The default values of configurations: (yes / no) no
     - The wire protocol: (yes / no) no
     - The rest endpoints: (yes / no) no
     - The admin cli options: (yes / no) yes
     - Anything that affects deployment: (yes / no / don't know) no
   
   ### Documentation
   
   need doc, i will update it later
   
   
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-925648590


   /pulsarbot run-failure-checks


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-964855286


   @eolivelli  PTAL again


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-913408559


   > @gaozhangmin Thanks for your doc. Does the code change affect only master or other versioned docs (for example, 2.8.1 and 2.8.2?
   > If latter, could you please help update all affected versions? Thanks
   
   I don't know which version it will be included


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on a change in pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#discussion_r702711938



##########
File path: pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Topics.java
##########
@@ -709,6 +709,26 @@ default void delete(String topic, boolean force) throws PulsarAdminException {
      */
     CompletableFuture<MessageId> terminateTopicAsync(String topic);
 
+    /**
+     * Terminate the partitioned topic and prevent any more messages being published on it.
+     * <p/>
+     *
+     * @param topic
+     *            topic name
+     * @return the message id of the last message that was published in the each partition of topic
+     */
+    List<MessageId> terminatePartitionedTopic(String topic) throws PulsarAdminException;

Review comment:
       Is it better to return a Map?
   Because it is hard to understand the contents of the list, especially in case of null values




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin removed a comment on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin removed a comment on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-964855286






-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-912271330


   @Anonymitaet  docs added


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] Anonymitaet commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-912187620


   @gaozhangmin Thanks for your great contribution. 
   Want users to know your awesome code changes? Do not forget to add docs accordingly! And you can ping me to review the docs. Let's grow Pulsar together!


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-912383605


   @BewareMyPower  @congbobo184  @315157973 
   I think, instead of introduce a new admin cli command `partitioned-terminate`,  allow `terminate` command to terminate a partitioned-topic would be better. What do you think. 
   
   then api `/{tenant}/{namespace}/{topic}/terminate/partitions`  would be useless.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on a change in pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on a change in pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#discussion_r703180578



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
##########
@@ -3069,23 +3069,29 @@ protected void internalTerminatePartitionedTopic(AsyncResponse asyncResponse, bo
         validateTopicOwnership(topicName, authoritative);
         validateTopicOperation(topicName, TopicOperation.TERMINATE);
 
-      List<MessageId> messageIds = new ArrayList<>();
+      Map<Integer, MessageId> messageIds = new HashMap<>();

Review comment:
       done




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-914214016


   /pulsarbot run-failure-checks


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-920834470


   /pulsarbot run-failure-checks
   
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-914815150


   /pulsarbot run-failure-checks
   
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin removed a comment on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin removed a comment on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-913405443


   > @gaozhangmin Thanks for your doc. Does the code change affect only master or other versioned docs (for example, 2.8.1 and 2.8.2?
   > If latter, could you please help update all affected versions? Thanks
   
   Only master, I think.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-912396673


   I prefer the previous one. Because for other commands we also use `partition-xxx` for partitioned topics.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-912495742


   @315157973  test added. PTAL.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on a change in pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on a change in pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#discussion_r701751332



##########
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:
       After test added, I found the request would be stuck until timeout exception. From log, It requests rest api  `/{tenant}/{namespace}/{topic}/terminate/partitions` successfully, but doesn't return. I can't tell why. PTAL.
   
   @BewareMyPower  




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-913412769


   > It looks good. Could you please also add a unit test in `PulsarAdminToolTest.java` ?
   
   done


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-923046430


   /pulsarbot run-failure-checks


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-925756669


   /pulsarbot run-failure-checks


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-913405443


   > @gaozhangmin Thanks for your doc. Does the code change affect only master or other versioned docs (for example, 2.8.1 and 2.8.2?
   > If latter, could you please help update all affected versions? Thanks
   
   Only master, I think.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-912367559


   > Could you add some unit tests? What if my parameter is a non-partitionedTopic?
   
   The restful api test is already covered by `testTerminatePartitionedTopic`.
   I will add a  admin client request test.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-976109636


   @eolivelli  @codelipenghui  PTAL again 


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] Anonymitaet commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-913251596


   @gaozhangmin Thanks for your doc. Does the code change affect only master or other versioned docs (for example, 2.8.1 and 2.8.2? 
   If latter, could you please help update all affected versions? Thanks


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-911309393


   @BewareMyPower  PTAL


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli merged pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
eolivelli merged pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893


   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on a change in pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#discussion_r703013367



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
##########
@@ -3069,23 +3069,29 @@ protected void internalTerminatePartitionedTopic(AsyncResponse asyncResponse, bo
         validateTopicOwnership(topicName, authoritative);
         validateTopicOperation(topicName, TopicOperation.TERMINATE);
 
-      List<MessageId> messageIds = new ArrayList<>();
+      Map<Integer, MessageId> messageIds = new HashMap<>();

Review comment:
       This mapping is accessed by multiple threads.
   It should be a synchonized map or ConcurrentHashMap




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin edited a comment on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin edited a comment on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-912367559


   > Could you add some unit tests? What if my parameter is a non-partitionedTopic?
   
   The restful api test is already covered by `testTerminatePartitionedTopic`.
   
   https://github.com/apache/pulsar/blob/5b2b1c9a128898c00b57fcd5d3918e21ff7b67b6/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/PersistentTopicsTest.java#L311-L333
   
   I will add a  admin client request test.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-943128956


   @eolivelli Could you review it again? I think your comments have been addressed.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-925845266


   /pulsarbot run-failure-checks


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on a change in pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on pull request #11893: Admin cli support terminate a partitioned topic

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on pull request #11893:
URL: https://github.com/apache/pulsar/pull/11893#issuecomment-989486298


   @codelipenghui  This pr is ready to merge. I think.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org