MarvinCai commented on a change in pull request #11119:
URL: https://github.com/apache/pulsar/pull/11119#discussion_r661146025



##########
File path: 
pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Topics.java
##########
@@ -849,6 +850,62 @@ default TopicStats getStats(String topic) throws 
PulsarAdminException {
         return getStatsAsync(topic, false, false);
     }
 
+
+    /**
+     * Get the stats for non-persistent topic.
+     * All the rates are computed over a 1 minute window and are relative the 
last completed 1 minute period.
+     *
+     * @param topic
+     *            topic name
+     * @param getPreciseBacklog
+     *            Set to true to get precise backlog, Otherwise get imprecise 
backlog.
+     * @param subscriptionBacklogSize
+     *            Whether to get backlog size for each subscription.
+     * @return the topic statistics
+     *
+     * @throws NotAuthorizedException
+     *             Don't have admin permission
+     * @throws NotFoundException
+     *             Topic does not exist
+     * @throws PulsarAdminException
+     *             Unexpected error
+     */
+    NonPersistentTopicStats getStatsNonPersistent(String topic, boolean 
getPreciseBacklog,

Review comment:
       @codelipenghui 
   I've tried that before, once the response object got serialized as 
TopicStats, even we convert it to NonPersistentTopicStats later the msgDropRate 
field will be missing, I think it's just lost during deserialization, so seems 
we'll have to deserialize to the desired type or interface when we get the 
response(NonPersistentTopicStats).




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