public interface ModularLoadManager
| Modifier and Type | Method and Description |
|---|---|
void |
checkNamespaceBundleSplit()
As the leader broker, attempt to automatically detect and split hot namespace bundles.
|
void |
disableBroker()
As any broker, disable the broker this manager is running on.
|
void |
doLoadShedding()
As the leader broker, select bundles for the namespace service to unload so that they may be reassigned to new
brokers.
|
Set<String> |
getAvailableBrokers()
Get available broker list in cluster.
|
org.apache.pulsar.policies.data.loadbalancer.LocalBrokerData |
getBrokerLocalData(String broker)
Fetch local-broker data from load-manager broker cache.
|
List<org.apache.pulsar.common.stats.Metrics> |
getLoadBalancingMetrics()
Fetch load balancing metrics.
|
void |
initialize(PulsarService pulsar)
Initialize this load manager using the given pulsar service.
|
Optional<String> |
selectBrokerForAssignment(org.apache.pulsar.common.naming.ServiceUnitId serviceUnit)
As the leader broker, find a suitable broker for the assignment of the given bundle.
|
void |
start()
As any broker, start the load manager.
|
void |
stop()
As any broker, stop the load manager.
|
org.apache.pulsar.policies.data.loadbalancer.LocalBrokerData |
updateLocalBrokerData()
As any broker, retrieve the namespace bundle stats and system resource usage to update data local to this broker.
|
void |
writeBrokerDataOnZooKeeper()
As any broker, write the local broker data to ZooKeeper.
|
default void |
writeBrokerDataOnZooKeeper(boolean force)
As any broker, write the local broker data to ZooKeeper, forced or not.
|
void |
writeBundleDataOnZooKeeper()
As the leader broker, write bundle data aggregated from all brokers to ZooKeeper.
|
void disableBroker()
throws PulsarServerException
PulsarServerException - If ZooKeeper failed to disable the broker.void doLoadShedding()
void checkNamespaceBundleSplit()
void initialize(PulsarService pulsar)
Optional<String> selectBrokerForAssignment(org.apache.pulsar.common.naming.ServiceUnitId serviceUnit)
serviceUnit - ServiceUnitId for the bundle.void start()
throws PulsarServerException
PulsarServerException - If an unexpected error prevented the load manager from being started.void stop() throws PulsarServerException
PulsarServerException - If an unexpected error occurred when attempting to stop the load manager.org.apache.pulsar.policies.data.loadbalancer.LocalBrokerData updateLocalBrokerData()
void writeBrokerDataOnZooKeeper()
default void writeBrokerDataOnZooKeeper(boolean force)
void writeBundleDataOnZooKeeper()
Set<String> getAvailableBrokers()
org.apache.pulsar.policies.data.loadbalancer.LocalBrokerData getBrokerLocalData(String broker)
broker - load-balancer pathList<org.apache.pulsar.common.stats.Metrics> getLoadBalancingMetrics()
Copyright © 2017–2022 Apache Software Foundation. All rights reserved.