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 2022/02/02 10:36:14 UTC

[GitHub] [pulsar] equanz commented on a change in pull request #12401: [PIP 79][common,broker,client] Change PartitionedTopicStats to aggregate by producerName

equanz commented on a change in pull request #12401:
URL: https://github.com/apache/pulsar/pull/12401#discussion_r797470620



##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/stats/NonPersistentTopicStatsImpl.java
##########
@@ -57,7 +62,11 @@
 
     @JsonProperty("publishers")
     public List<NonPersistentPublisherStats> getNonPersistentPublishers() {
-        return (List<NonPersistentPublisherStats>) nonPersistentPublishers;
+        return Stream.concat(nonPersistentPublishers.stream()
+                                .sorted(Comparator.comparing(NonPersistentPublisherStats::getProducerName)),

Review comment:
       > do you really need this list to be sorted ?
   
   I don't strongly need the sorted order. It is for a consistent reason. Currently, publishers have some constant order even if they get stats in many times.
   I'll remove the reordering operation if we don't have to support consistent orders.




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