You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/11/15 13:17:05 UTC

[GitHub] [pulsar] crossoverJie created a discussion: Why PersistentTopicInternalStats don't provide getter/setter method?

GitHub user crossoverJie created a discussion: Why PersistentTopicInternalStats don't provide getter/setter method?

https://github.com/apache/pulsar/blob/master/pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/PersistentTopicInternalStats.java

https://github.com/apache/pulsar/blob/master/pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/partition/PartitionedTopicMetadata.java

When I am using the admin API, I find that there is no getter/setter method for the returned data, and I would like to know the reason for this design.

The first impression is that it is not Java-like.

GitHub link: https://github.com/apache/pulsar/discussions/18481

----
This is an automatically sent email for dev@pulsar.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@pulsar.apache.org


[GitHub] [pulsar] crossoverJie added a comment to the discussion: Why PersistentTopicInternalStats don't provide getter/setter method?

Posted by GitBox <gi...@apache.org>.
GitHub user crossoverJie added a comment to the discussion: Why PersistentTopicInternalStats don't provide getter/setter method?

Thank you for your answer, I think I can help fix this.

GitHub link: https://github.com/apache/pulsar/discussions/18481#discussioncomment-4149098

----
This is an automatically sent email for dev@pulsar.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@pulsar.apache.org


[GitHub] [pulsar] michaeljmarshall added a comment to the discussion: Why PersistentTopicInternalStats don't provide getter/setter method?

Posted by GitBox <gi...@apache.org>.
GitHub user michaeljmarshall added a comment to the discussion: Why PersistentTopicInternalStats don't provide getter/setter method?

Seems like an oversight to me. There could definitely be getter methods for the fields in those classes, but I don't think we need setter methods. Similarly, `org.apache.pulsar.common.policies.data.PartitionedTopicStats` only has getters.

GitHub link: https://github.com/apache/pulsar/discussions/18481#discussioncomment-4149075

----
This is an automatically sent email for dev@pulsar.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@pulsar.apache.org