Class LeastLongTermMessageRate
- java.lang.Object
-
- org.apache.pulsar.broker.loadbalance.impl.LeastLongTermMessageRate
-
- All Implemented Interfaces:
ModularLoadManagerStrategy
public class LeastLongTermMessageRate extends java.lang.Object implements ModularLoadManagerStrategy
Placement strategy which selects a broker based on which one has the least long term message rate.
-
-
Constructor Summary
Constructors Constructor Description LeastLongTermMessageRate(org.apache.pulsar.broker.ServiceConfiguration conf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.lang.String>selectBroker(java.util.Set<java.lang.String> candidates, BundleData bundleToAssign, LoadData loadData, org.apache.pulsar.broker.ServiceConfiguration conf)Find a suitable broker to assign the given bundle to.
-
-
-
Method Detail
-
selectBroker
public java.util.Optional<java.lang.String> selectBroker(java.util.Set<java.lang.String> candidates, 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.
-
-