thetumbled commented on code in PR #21085:
URL: https://github.com/apache/pulsar/pull/21085#discussion_r1309536646


##########
pulsar-common/src/main/java/org/apache/pulsar/policies/data/loadbalancer/TimeAverageMessageData.java:
##########
@@ -177,4 +175,40 @@ public double totalMsgRate() {
     public double totalMsgThroughput() {
         return msgThroughputIn + msgThroughputOut;
     }
+
+    @Override
+    public int compareTo(TimeAverageMessageData other) {
+        int result = this.compareByBandwidthIn(other);
+
+        if (result == 0) {
+            result = this.compareByBandwidthOut(other);
+        }

Review Comment:
   I imitate the logic implemented by 
   
https://github.com/apache/pulsar/blob/d099ac4fa2f217b9c5f0a5e660c83048e829c5d7/pulsar-client-admin-api/src/main/java/org/apache/pulsar/policies/data/loadbalancer/NamespaceBundleStats.java#L70-L87



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