lhotari commented on code in PR #24285:
URL: https://github.com/apache/pulsar/pull/24285#discussion_r2084076346
##########
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/PersistentOfflineTopicStats.java:
##########
@@ -23,19 +23,27 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import lombok.Getter;
+import lombok.Setter;
/**
* This object is populated using meta data in zookeeper without actually
bringing the topic online.
*/
public class PersistentOfflineTopicStats {
/** Space used to store the messages for the topic (bytes). */
- public long storageSize;
+ @Getter
+ @Setter
+ private long storageSize;
/** Total number of messages. */
- public long totalMessages;
+ @Getter
+ @Setter
+ private long totalMessages;
/** Total backlog. */
- public long messageBacklog;
+ @Getter
+ @Setter
+ private long messageBacklog;
/** Broker host where this stat was generated. */
public final String brokerName;
Review Comment:
These fields should be handled for consistency.
##########
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/PersistentOfflineTopicStats.java:
##########
@@ -23,19 +23,27 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import lombok.Getter;
+import lombok.Setter;
/**
* This object is populated using meta data in zookeeper without actually
bringing the topic online.
*/
public class PersistentOfflineTopicStats {
/** Space used to store the messages for the topic (bytes). */
- public long storageSize;
+ @Getter
+ @Setter
+ private long storageSize;
/** Total number of messages. */
- public long totalMessages;
+ @Getter
+ @Setter
+ private long totalMessages;
/** Total backlog. */
- public long messageBacklog;
+ @Getter
+ @Setter
+ private long messageBacklog;
Review Comment:
These are most likely a breaking change in the public API. In other stats
classes there's a separate "Impl" class and a separate interface. I don't see a
way how to preserve API compatibility and perhaps we should just break the API
when making the change.
--
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]