[Broker] Add admin api to get bundle stats
Motivation
We have admin api to list bundles of a broker, but we could not get the stats of each bundle. Sometimes we need to known the throughput and the topics included of each bundle, as so we could implement customize bundle split strategy from outside service.
Modifications
Add admin api to get bundle stats
- get all bundles stats from one broker in
BrokerStats - get single bundle stats under a namespace in
Namespaces
Verifying this change
This change added tests and can be verified as follows: NamespacesTest.testGetBundleStats
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: (no)
- The default values of configurations: ( no)
- The wire protocol: (no)
- The rest endpoints: (yes)
- The admin cli options: (yes)
- Anything that affects deployment: (no)
Documentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
-
[x]
no-need-docAdmin API doc is genertate from source code.
@wangjialing218:Thanks for your contribution. For this PR, do we need to update docs? (The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)
/pulsarbot run-failure-checks
Hi @wangjialing218 as you said, the doc is generated from code files, so please tick the doc box since your PR contains doc changes.
As shown below, tick means x, not -. Otherwise, Bot can not recognize the label and label this PR with doc-info-missing, thanks

@michaeljmarshall could you review again when you have time
/pulsarbot run-failure-checks
@michaeljmarshall @shibd Please have a check again.
I have removed getAllBundleStats in Namespaces,add api to BrokerStats to get all bundle stats from one broker, with a paramter broker, and add redirect for getBundleStats in Namespaces to get single bundle stats.
The pr had no activity for 30 days, mark with Stale label.
The pr had no activity for 30 days, mark with Stale label.