Add a new admin API getAllLoadReport()
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Motivation
I want to get the load information of all brokers and currently I can only do it by a loop call `org.apache.pulsar.client.admin.BrokerStats#getLoadReport`
Also, I need to save additional IP information for all brokers.
### Solution
Add a new admin API `getAllLoadReport()` to get information about all brokers.
### Alternatives
At the moment I can think of two implementation options:
- Internally call the `getLoadReport` API of all brokers to aggregate their data.
- Refer to the `org.apache.pulsar.testclient.BrokerMonitor` implementation to get information from `ZooKeeper`.
https://github.com/apache/pulsar/blob/002fa49692ff4b8b038bf2edeeb3b32ed218e64f/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/BrokerMonitor.java#L51-L55
Any better suggestions?
### Anything else?
_No response_
### Are you willing to submit a PR?
- [X] I'm willing to submit a PR!
Contributor guide
Research direction
Start with org.apache.pulsar.client.admin.BrokerStats#getLoadReport and the referenced pulsar-testclient/src/main/java/org/apache/pulsar/testclient/BrokerMonitor.java implementation. Compare aggregating broker calls with reading ZooKeeper, then determine the admin API entry point and tests needed; done means getAllLoadReport() returns load information for all brokers, including the required IP information.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100