Class NoopLoadManager
java.lang.Object
org.apache.pulsar.broker.loadbalance.NoopLoadManager
- All Implemented Interfaces:
LoadManager
-
Field Summary
Fields inherited from interface org.apache.pulsar.broker.loadbalance.LoadManager
LOADBALANCE_BROKERS_ROOT, LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves visibility of current broker from loadbalancer list so, other brokers can't redirect any request to this broker and this broker won't accept new connection requests.voidUnload a candidate service unit to balance the load.voidNamespace bundle split.org.apache.pulsar.policies.data.loadbalancer.LoadManagerReportGenerate the load report.Get list of available brokers in cluster.getLeastLoaded(org.apache.pulsar.common.naming.ServiceUnitId su) Returns the Least Loaded Resource Unit decided by some algorithm or criteria which is implementation specific.List<org.apache.pulsar.common.stats.Metrics>Generate load balancing stats metrics.voidinitialize(PulsarService pulsar) Initialize this LoadManager.booleanIs centralized decision making to assign a new bundle.voidSet flag to force load report update.voidstart()voidstop()voidPublish the current load report on ZK.voidUpdate namespace bundle resource quota on ZK.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.LoadManager
writeLoadReportOnZookeeper
-
Constructor Details
-
NoopLoadManager
public NoopLoadManager()
-
-
Method Details
-
initialize
Description copied from interface:LoadManagerInitialize this LoadManager.- Specified by:
initializein interfaceLoadManager- Parameters:
pulsar- The service to initialize this with.
-
start
public void start() throws org.apache.pulsar.broker.PulsarServerException- Specified by:
startin interfaceLoadManager- Throws:
org.apache.pulsar.broker.PulsarServerException
-
isCentralized
public boolean isCentralized()Description copied from interface:LoadManagerIs centralized decision making to assign a new bundle.- Specified by:
isCentralizedin interfaceLoadManager
-
getLeastLoaded
public Optional<ResourceUnit> getLeastLoaded(org.apache.pulsar.common.naming.ServiceUnitId su) throws Exception Description copied from interface:LoadManagerReturns the Least Loaded Resource Unit decided by some algorithm or criteria which is implementation specific.- Specified by:
getLeastLoadedin interfaceLoadManager- Throws:
Exception
-
generateLoadReport
public org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport generateLoadReport() throws ExceptionDescription copied from interface:LoadManagerGenerate the load report.- Specified by:
generateLoadReportin interfaceLoadManager- Throws:
Exception
-
setLoadReportForceUpdateFlag
public void setLoadReportForceUpdateFlag()Description copied from interface:LoadManagerSet flag to force load report update.- Specified by:
setLoadReportForceUpdateFlagin interfaceLoadManager
-
writeLoadReportOnZookeeper
Description copied from interface:LoadManagerPublish the current load report on ZK.- Specified by:
writeLoadReportOnZookeeperin interfaceLoadManager- Throws:
Exception
-
writeResourceQuotasToZooKeeper
Description copied from interface:LoadManagerUpdate namespace bundle resource quota on ZK.- Specified by:
writeResourceQuotasToZooKeeperin interfaceLoadManager- Throws:
Exception
-
getLoadBalancingMetrics
Description copied from interface:LoadManagerGenerate load balancing stats metrics.- Specified by:
getLoadBalancingMetricsin interfaceLoadManager
-
doLoadShedding
public void doLoadShedding()Description copied from interface:LoadManagerUnload a candidate service unit to balance the load.- Specified by:
doLoadSheddingin interfaceLoadManager
-
doNamespaceBundleSplit
Description copied from interface:LoadManagerNamespace bundle split.- Specified by:
doNamespaceBundleSplitin interfaceLoadManager- Throws:
Exception
-
disableBroker
Description copied from interface:LoadManagerRemoves visibility of current broker from loadbalancer list so, other brokers can't redirect any request to this broker and this broker won't accept new connection requests.- Specified by:
disableBrokerin interfaceLoadManager- Throws:
Exception
-
getAvailableBrokers
Description copied from interface:LoadManagerGet list of available brokers in cluster.- Specified by:
getAvailableBrokersin interfaceLoadManager- Returns:
- Throws:
Exception
-
getAvailableBrokersAsync
- Specified by:
getAvailableBrokersAsyncin interfaceLoadManager
-
stop
public void stop() throws org.apache.pulsar.broker.PulsarServerException- Specified by:
stopin interfaceLoadManager- Throws:
org.apache.pulsar.broker.PulsarServerException
-