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 2020/12/03 10:23:58 UTC

[GitHub] [pulsar] BewareMyPower opened a new issue #8813: Get partition metadata for a non-existed topic returns 0

BewareMyPower opened a new issue #8813:
URL: https://github.com/apache/pulsar/issues/8813


   **Describe the bug**
   When getting the partition metadata for a non-existed topic, it returns 0 instead of throwing an exception.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Run a pulsar standalone
   2. Get a topic's partition number
   
   ```java
           try (PulsarAdmin admin = PulsarAdmin.builder().serviceHttpUrl("http://localhost:8080").build()) {
               System.out.println(admin.topics().getPartitionedTopicMetadata("xxxxx").partitions);
           } catch (/* ... */) {
   ```
   
   3. The output is 0 and no exception was thrown.
   
   **Expected behavior**
   It should throw an exception because for a non-partitioned topic, its partitions should be 0, so we cannot distinguish a non-existed topic from a non-partitioned topic.


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

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



[GitHub] [pulsar] codelipenghui closed issue #8813: Get partition metadata for a non-existed topic returns 0

Posted by GitBox <gi...@apache.org>.
codelipenghui closed issue #8813:
URL: https://github.com/apache/pulsar/issues/8813


   


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

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