Interface BrokerFilter
-
- All Known Implementing Classes:
BrokerVersionFilter
public interface BrokerFilterLoad 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidfilter(java.util.Set<java.lang.String> brokers, 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 Detail
-
filter
void filter(java.util.Set<java.lang.String> brokers, BundleData bundleToAssign, LoadData loadData, org.apache.pulsar.broker.ServiceConfiguration conf) throws BrokerFilterExceptionFrom 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
-
-