pulsar-client-go icon indicating copy to clipboard operation
pulsar-client-go copied to clipboard

feat: added missing fields on TopicStats

Open jffp113 opened this issue 2 years ago • 1 comments

Motivation

When using the admin api with golang there is some missing fields on topic stats: https://pulsar.apache.org/docs/next/admin-api-topics/#get-stats

Modifications

Added missing fields on topic stats

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): no
  • The public API: yes
  • The schema: yes
  • The default values of configurations: no
  • The wire protocol: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? PulsarDoc
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

jffp113 avatar Nov 21 '23 13:11 jffp113

I think we need to add GetPartitionedStats and GetPartitionedStatsWithOption interface test cases in topic_test.go. Since make test command will automatically deploy a pulsar broker in test period, it is quite easy to write test cases. And we can refer TestPartitionStats test case in the latest default branch.

image

geniusjoe avatar Mar 25 '24 08:03 geniusjoe