apache / pulsar

Apache Pulsar - distributed pub-sub messaging system
https://pulsar.apache.org/
Apache License 2.0
14.2k stars 3.58k forks source link

Add a new admin API getAllLoadReport() #19403

Open crossoverJie opened 1 year ago

crossoverJie commented 1 year ago

Search before asking

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:

Any better suggestions?

Anything else?

No response

Are you willing to submit a PR?

github-actions[bot] commented 1 year ago

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

tisonkun commented 1 year ago

@Technoboy- @codelipenghui do we agree on this direction? Or it's just won't do.

I can imagine that "loop call org.apache.pulsar.client.admin.BrokerStats#getLoadReport" doesn't sound too bad.

github-actions[bot] commented 1 year ago

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

Technoboy- commented 1 year ago

@Technoboy- @codelipenghui do we agree on this direction? Or it's just won't do.

I can imagine that "loop call org.apache.pulsar.client.admin.BrokerStats#getLoadReport" doesn't sound too bad.

Ah, sorry for the late response. It's ok to add this kind of the API.

Refer to the org.apache.pulsar.testclient.BrokerMonitor implementation to get information from ZooKeeper.

Looks better

crossoverJie commented 1 year ago

@Technoboy- Please assign it to me, thanks.

github-actions[bot] commented 1 year ago

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