java.lang.Object
org.apache.pulsar.broker.loadbalance.extensions.data.BrokerLoadData

public class BrokerLoadData extends Object
Contains all the data that is maintained locally on each broker. Migrate from LocalBrokerData. And removed the lookup data, see BrokerLookupData
  • 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

      public void update(BrokerLoadData other)
      Using another BrokerLoadData, update this.
      Parameters:
      other - BrokerLoadData to update from.
    • clear

      public void clear()
    • toString

      public String toString(ServiceConfiguration conf)
    • toMetrics

      public List<org.apache.pulsar.common.stats.Metrics> toMetrics(String advertisedBrokerAddress)