Class LeastLongTermMessageRate
java.lang.Object
org.apache.pulsar.broker.loadbalance.impl.LeastLongTermMessageRate
- All Implemented Interfaces:
ModularLoadManagerStrategy
Placement strategy which selects a broker based on which one has the least long term message rate.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LeastLongTermMessageRate
public LeastLongTermMessageRate()
-
-
Method Details
-
selectBroker
public Optional<String> selectBroker(Set<String> candidates, org.apache.pulsar.policies.data.loadbalancer.BundleData bundleToAssign, LoadData loadData, org.apache.pulsar.broker.ServiceConfiguration conf) Find a suitable broker to assign the given bundle to.- Specified by:
selectBrokerin interfaceModularLoadManagerStrategy- Parameters:
candidates- The candidates for which the bundle may be assigned.bundleToAssign- The data for the bundle to assign.loadData- The load data from the leader broker.conf- The service configuration.- Returns:
- The name of the selected broker as it appears on ZooKeeper.
-