Interface BrokerFilter

All Known Implementing Classes:
BrokerVersionFilter

public interface BrokerFilter
Load management component which determines what brokers should not be considered for topic placement by the placement strategy. For example, the placement strategy may determine that the broker with the least msg/s should get the bundle assignment, but we may not want to consider brokers whose CPU usage is very high. Thus, we could use a filter to blacklist brokers with high CPU usage.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    filter(Set<String> brokers, org.apache.pulsar.policies.data.loadbalancer.BundleData bundleToAssign, LoadData loadData, org.apache.pulsar.broker.ServiceConfiguration conf)
    From the given set of available broker candidates, filter those using the load data.
  • Method Details

    • filter

      void filter(Set<String> brokers, org.apache.pulsar.policies.data.loadbalancer.BundleData bundleToAssign, LoadData loadData, org.apache.pulsar.broker.ServiceConfiguration conf) throws BrokerFilterException
      From the given set of available broker candidates, filter those using the load data.
      Parameters:
      brokers - The currently available brokers that have not already been filtered. This set may be modified by filter.
      bundleToAssign - The data for the bundle to assign.
      loadData - The load data from the leader broker.
      conf - The service configuration.
      Throws:
      BrokerFilterException - There was an error in the pipeline and the brokers should be reset to their original value