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



##########
File path: 
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/stats/NonPersistentTopicStatsImpl.java
##########
@@ -47,31 +45,49 @@
     @Getter
     public double msgDropRate;
 
-    /** List of connected publishers on this topic w/ their stats. */
-    @Getter
-    public List<? extends NonPersistentPublisherStats> publishers;
+    @JsonIgnore
+    public List<PublisherStatsImpl> publishers;
 
-    /** Map of subscriptions with their individual statistics. */
-    @Getter
-    public Map<String, ? extends NonPersistentSubscriptionStats> subscriptions;
+    @JsonIgnore
+    public Map<String, SubscriptionStatsImpl> subscriptions;
 
-    /** Map of replication statistics by remote cluster context. */
-    @Getter
-    public Map<String, ? extends NonPersistentReplicatorStats> replication;
+    @JsonIgnore
+    public Map<String, ReplicatorStatsImpl> replication;
+
+    public List<NonPersistentPublisherStats> getNonPersistentPublishers() {
+        return (List<NonPersistentPublisherStats>) nonPersistentPublishers;
+    }
+
+    public Map<String, NonPersistentSubscriptionStats> 
getNonPersistentSubscriptions() {
+        return (Map<String, NonPersistentSubscriptionStats>) 
nonPersistentSubscriptions;
+    }
+
+    public Map<String, NonPersistentReplicatorStats> 
getNonPersistentReplicators() {
+        return (Map<String, NonPersistentReplicatorStats>) 
nonPersistentReplicators;
+    }
+
+    /** List of connected publishers on this non-persistent topic w/ their 
stats. */
+    public List<? extends NonPersistentPublisherStats> nonPersistentPublishers;
+
+    /** Map of non-persistent subscriptions with their individual statistics. 
*/
+    public Map<String, ? extends NonPersistentSubscriptionStats> 
nonPersistentSubscriptions;
+
+    /** Map of non-persistent replication statistics by remote cluster 
context. */
+    public Map<String, ? extends NonPersistentReplicatorStats> 
nonPersistentReplicators;

Review comment:
       @JsonAlias seems only used during deserialization, used @JasonProperty 
to keep the output field name. Updated issue description.




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