public class NoopLoadManager extends Object implements LoadManager
LOADBALANCE_BROKERS_ROOT, LOG| Constructor and Description |
|---|
NoopLoadManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
disableBroker()
Removes 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.
|
void |
doLoadShedding()
Unload a candidate service unit to balance the load.
|
void |
doNamespaceBundleSplit()
Namespace bundle split.
|
org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport |
generateLoadReport()
Generate the load report.
|
Set<String> |
getAvailableBrokers()
Get list of available brokers in cluster.
|
Optional<ResourceUnit> |
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> |
getLoadBalancingMetrics()
Generate load balancing stats metrics.
|
void |
initialize(PulsarService pulsar)
Initialize this LoadManager.
|
boolean |
isCentralized()
Is centralized decision making to assign a new bundle.
|
void |
setLoadReportForceUpdateFlag()
Set flag to force load report update.
|
void |
start() |
void |
stop() |
void |
writeLoadReportOnZookeeper()
Publish the current load report on ZK.
|
void |
writeResourceQuotasToZooKeeper()
Update namespace bundle resource quota on ZK.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, writeLoadReportOnZookeeperpublic void initialize(PulsarService pulsar)
LoadManagerinitialize in interface LoadManagerpulsar - The service to initialize this with.public void start()
throws PulsarServerException
start in interface LoadManagerPulsarServerExceptionpublic boolean isCentralized()
LoadManagerisCentralized in interface LoadManagerpublic Optional<ResourceUnit> getLeastLoaded(org.apache.pulsar.common.naming.ServiceUnitId su) throws Exception
LoadManagergetLeastLoaded in interface LoadManagerExceptionpublic org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport generateLoadReport()
throws Exception
LoadManagergenerateLoadReport in interface LoadManagerExceptionpublic void setLoadReportForceUpdateFlag()
LoadManagersetLoadReportForceUpdateFlag in interface LoadManagerpublic void writeLoadReportOnZookeeper()
throws Exception
LoadManagerwriteLoadReportOnZookeeper in interface LoadManagerExceptionpublic void writeResourceQuotasToZooKeeper()
throws Exception
LoadManagerwriteResourceQuotasToZooKeeper in interface LoadManagerExceptionpublic List<org.apache.pulsar.common.stats.Metrics> getLoadBalancingMetrics()
LoadManagergetLoadBalancingMetrics in interface LoadManagerpublic void doLoadShedding()
LoadManagerdoLoadShedding in interface LoadManagerpublic void doNamespaceBundleSplit()
throws Exception
LoadManagerdoNamespaceBundleSplit in interface LoadManagerExceptionpublic void disableBroker()
throws Exception
LoadManagerdisableBroker in interface LoadManagerExceptionpublic Set<String> getAvailableBrokers() throws Exception
LoadManagergetAvailableBrokers in interface LoadManagerExceptionpublic void stop()
throws PulsarServerException
stop in interface LoadManagerPulsarServerExceptionCopyright © 2017–2022 Apache Software Foundation. All rights reserved.