pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[Broker] Add admin api to get bundle stats

Open wangjialing218 opened this issue 4 years ago • 8 comments

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

    Admin API doc is genertate from source code.

wangjialing218 avatar Dec 08 '21 03:12 wangjialing218

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

github-actions[bot] avatar Dec 08 '21 03:12 github-actions[bot]

/pulsarbot run-failure-checks

wangjialing218 avatar Dec 08 '21 07:12 wangjialing218

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 image

Anonymitaet avatar Dec 09 '21 03:12 Anonymitaet

@michaeljmarshall could you review again when you have time

wangjialing218 avatar Dec 09 '21 09:12 wangjialing218

/pulsarbot run-failure-checks

wangjialing218 avatar Dec 24 '21 05:12 wangjialing218

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

wangjialing218 avatar Dec 24 '21 06:12 wangjialing218

The pr had no activity for 30 days, mark with Stale label.

github-actions[bot] avatar Feb 26 '22 01:02 github-actions[bot]

The pr had no activity for 30 days, mark with Stale label.

github-actions[bot] avatar May 30 '22 02:05 github-actions[bot]