Class UniformLoadShedder
java.lang.Object
org.apache.pulsar.broker.loadbalance.impl.UniformLoadShedder
- All Implemented Interfaces:
LoadSheddingStrategy
This strategy tends to distribute load uniformly across all brokers. This strategy checks load difference between
broker with highest load and broker with lowest load. If the difference is higher than configured thresholds
ServiceConfiguration.getLoadBalancerMsgRateDifferenceShedderThreshold() or
ServiceConfiguration.getLoadBalancerMsgThroughputMultiplierDifferenceShedderThreshold() then it finds out
bundles which can be unloaded to distribute traffic evenly across all brokers.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindBundlesForUnloading(LoadData loadData, org.apache.pulsar.broker.ServiceConfiguration conf) Attempt to shed some bundles off every broker which is overloaded.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pulsar.broker.loadbalance.LoadSheddingStrategy
onActiveBrokersChange
-
Constructor Details
-
UniformLoadShedder
public UniformLoadShedder()
-
-
Method Details
-
findBundlesForUnloading
public com.google.common.collect.Multimap<String,String> findBundlesForUnloading(LoadData loadData, org.apache.pulsar.broker.ServiceConfiguration conf) Attempt to shed some bundles off every broker which is overloaded.- Specified by:
findBundlesForUnloadingin interfaceLoadSheddingStrategy- Parameters:
loadData- The load data to used to make the unloading decision.conf- The service configuration.- Returns:
- A map from bundles to unload to the brokers on which they are loaded.
-