public interface Brokers
| Modifier and Type | Method and Description |
|---|---|
void |
backlogQuotaCheck()
Manually trigger backlogQuotaCheck.
|
CompletableFuture<Void> |
backlogQuotaCheckAsync()
Manually trigger backlogQuotaCheck asynchronously.
|
void |
deleteDynamicConfiguration(String configName)
It deletes dynamic configuration value into ZooKeeper.
|
CompletableFuture<Void> |
deleteDynamicConfigurationAsync(String configName)
It deletes dynamic configuration value into ZooKeeper asynchronously.
|
List<String> |
getActiveBrokers(String cluster)
Get the list of active brokers in the cluster.
|
CompletableFuture<List<String>> |
getActiveBrokersAsync(String cluster)
Get the list of active brokers in the cluster asynchronously.
|
Map<String,String> |
getAllDynamicConfigurations()
Get values of all overridden dynamic-configs.
|
CompletableFuture<Map<String,String>> |
getAllDynamicConfigurationsAsync()
Get values of all overridden dynamic-configs asynchronously.
|
List<String> |
getDynamicConfigurationNames()
Get list of updatable configuration name.
|
CompletableFuture<List<String>> |
getDynamicConfigurationNamesAsync()
Get list of updatable configuration name asynchronously.
|
InternalConfigurationData |
getInternalConfigurationData()
Get the internal configuration data.
|
CompletableFuture<InternalConfigurationData> |
getInternalConfigurationDataAsync()
Get the internal configuration data asynchronously.
|
BrokerInfo |
getLeaderBroker()
Get the information of the leader broker.
|
CompletableFuture<BrokerInfo> |
getLeaderBrokerAsync()
Get the service url of the leader broker asynchronously.
|
Map<String,NamespaceOwnershipStatus> |
getOwnedNamespaces(String cluster,
String brokerUrl)
Get the map of owned namespaces and their status from a single broker in the cluster.
|
CompletableFuture<Map<String,NamespaceOwnershipStatus>> |
getOwnedNamespacesAsync(String cluster,
String brokerUrl)
Get the map of owned namespaces and their status from a single broker in the cluster asynchronously.
|
Map<String,String> |
getRuntimeConfigurations()
Get values of runtime configuration.
|
CompletableFuture<Map<String,String>> |
getRuntimeConfigurationsAsync()
Get values of runtime configuration asynchronously.
|
String |
getVersion()
Get version of broker.
|
void |
healthcheck()
Deprecated.
|
void |
healthcheck(TopicVersion topicVersion)
Run a healthcheck on the broker.
|
CompletableFuture<Void> |
healthcheckAsync()
Deprecated.
|
CompletableFuture<Void> |
healthcheckAsync(TopicVersion topicVersion)
Run a healthcheck on the broker asynchronously.
|
CompletableFuture<Void> |
shutDownBrokerGracefully(int maxConcurrentUnloadPerSec,
boolean forcedTerminateTopic)
Shutdown current broker gracefully.
|
void |
updateDynamicConfiguration(String configName,
String configValue)
Update a dynamic configuration value into ZooKeeper.
|
CompletableFuture<Void> |
updateDynamicConfigurationAsync(String configName,
String configValue)
Update a dynamic configuration value into ZooKeeper asynchronously.
|
List<String> getActiveBrokers(String cluster) throws PulsarAdminException
["prod1-broker1.messaging.use.example.com:8080", "prod1-broker2.messaging.use.example.com:8080"
* * "prod1-broker3.messaging.use.example.com:8080"]
cluster - Cluster namePulsarAdminException.NotAuthorizedException - You don't have admin permission to get the list of active brokers in the clusterPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException - Unexpected errorCompletableFuture<List<String>> getActiveBrokersAsync(String cluster)
["prod1-broker1.messaging.use.example.com:8080", "prod1-broker2.messaging.use.example.com:8080",
"prod1-broker3.messaging.use.example.com:8080"]
cluster - Cluster nameBrokerInfo getLeaderBroker() throws PulsarAdminException
{serviceUrl:"prod1-broker1.messaging.use.example.com:8080"}
PulsarAdminException - Unexpected errorCompletableFuture<BrokerInfo> getLeaderBrokerAsync() throws PulsarAdminException
{serviceUrl:"prod1-broker1.messaging.use.example.com:8080"}
PulsarAdminException - Unexpected errorMap<String,NamespaceOwnershipStatus> getOwnedNamespaces(String cluster, String brokerUrl) throws PulsarAdminException
{"ns-1":{"broker_assignment":"shared","is_active":"true","is_controlled":"false"},
"ns-2":{"broker_assignment":"primary","is_active":"true","is_controlled":"true"}}
cluster - brokerUrl - PulsarAdminExceptionCompletableFuture<Map<String,NamespaceOwnershipStatus>> getOwnedNamespacesAsync(String cluster, String brokerUrl)
{"ns-1":{"broker_assignment":"shared","is_active":"true","is_controlled":"false"},
"ns-2":{"broker_assignment":"primary","is_active":"true","is_controlled":"true"}}
cluster - brokerUrl - void updateDynamicConfiguration(String configName, String configValue) throws PulsarAdminException
ServiceConfiguration value
locallyconfigName - configValue - PulsarAdminExceptionCompletableFuture<Void> updateDynamicConfigurationAsync(String configName, String configValue)
ServiceConfiguration value
locallyconfigName - configValue - void deleteDynamicConfiguration(String configName) throws PulsarAdminException
configName - PulsarAdminExceptionCompletableFuture<Void> deleteDynamicConfigurationAsync(String configName)
configName - List<String> getDynamicConfigurationNames() throws PulsarAdminException
PulsarAdminExceptionCompletableFuture<List<String>> getDynamicConfigurationNamesAsync()
Map<String,String> getRuntimeConfigurations() throws PulsarAdminException
PulsarAdminExceptionCompletableFuture<Map<String,String>> getRuntimeConfigurationsAsync()
Map<String,String> getAllDynamicConfigurations() throws PulsarAdminException
PulsarAdminExceptionCompletableFuture<Map<String,String>> getAllDynamicConfigurationsAsync()
InternalConfigurationData getInternalConfigurationData() throws PulsarAdminException
PulsarAdminExceptionCompletableFuture<InternalConfigurationData> getInternalConfigurationDataAsync()
void backlogQuotaCheck()
throws PulsarAdminException
PulsarAdminExceptionCompletableFuture<Void> backlogQuotaCheckAsync()
@Deprecated void healthcheck() throws PulsarAdminException
PulsarAdminException - if the healthcheck fails.@Deprecated CompletableFuture<Void> healthcheckAsync()
void healthcheck(TopicVersion topicVersion) throws PulsarAdminException
PulsarAdminException - if the healthcheck fails.CompletableFuture<Void> healthcheckAsync(TopicVersion topicVersion)
CompletableFuture<Void> shutDownBrokerGracefully(int maxConcurrentUnloadPerSec, boolean forcedTerminateTopic)
maxConcurrentUnloadPerSec - forcedTerminateTopic - String getVersion() throws PulsarAdminException
PulsarAdminExceptionCopyright © 2017–2022 Apache Software Foundation. All rights reserved.