Class BrokerLoadData
java.lang.Object
org.apache.pulsar.broker.loadbalance.extensions.data.BrokerLoadData
Contains all the data that is maintained locally on each broker.
Migrate from
LocalBrokerData.
And removed the lookup data, see BrokerLookupData-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()List<org.apache.pulsar.common.stats.Metrics>toString(ServiceConfiguration conf) voidupdate(BrokerLoadData other) Using another BrokerLoadData, update this.voidupdate(org.apache.pulsar.policies.data.loadbalancer.SystemResourceUsage usage, double msgThroughputIn, double msgThroughputOut, double msgRateIn, double msgRateOut, long bundleCount, long topics, ServiceConfiguration conf) Using the system resource usage from the Pulsar client, update this BrokerLoadData.
-
Constructor Details
-
BrokerLoadData
public BrokerLoadData()
-
-
Method Details
-
update
public void update(org.apache.pulsar.policies.data.loadbalancer.SystemResourceUsage usage, double msgThroughputIn, double msgThroughputOut, double msgRateIn, double msgRateOut, long bundleCount, long topics, ServiceConfiguration conf) Using the system resource usage from the Pulsar client, update this BrokerLoadData.- Parameters:
usage- System resource usage (cpu, memory, and direct memory).msgThroughputIn- broker-level message input throughput in bytes/s.msgThroughputOut- broker-level message output throughput in bytes/s.msgRateIn- broker-level message input rate in messages/s.msgRateOut- broker-level message output rate in messages/s.bundleCount- broker-level bundle counts.conf- Service configuration to compute load data features.
-
update
Using another BrokerLoadData, update this.- Parameters:
other- BrokerLoadData to update from.
-
clear
public void clear() -
toString
-
toMetrics
-