public class BrokersImpl extends BaseResource implements Brokers
auth, readTimeoutMs| Constructor and Description |
|---|
BrokersImpl(javax.ws.rs.client.WebTarget web,
org.apache.pulsar.client.api.Authentication auth,
long readTimeoutMs) |
| 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.
|
org.apache.pulsar.common.conf.InternalConfigurationData |
getInternalConfigurationData()
Get the internal configuration data.
|
CompletableFuture<org.apache.pulsar.common.conf.InternalConfigurationData> |
getInternalConfigurationDataAsync()
Get the internal configuration data asynchronously.
|
Map<String,org.apache.pulsar.common.policies.data.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,org.apache.pulsar.common.policies.data.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()
Run a healthcheck on the broker.
|
CompletableFuture<Void> |
healthcheckAsync()
Run a healthcheck on the broker asynchronously.
|
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.
|
asyncDeleteRequest, asyncGetRequest, asyncPostRequest, asyncPutRequest, getApiException, getApiException, request, requestAsyncpublic BrokersImpl(javax.ws.rs.client.WebTarget web,
org.apache.pulsar.client.api.Authentication auth,
long readTimeoutMs)
public List<String> getActiveBrokers(String cluster) throws PulsarAdminException
Brokers
["prod1-broker1.messaging.use.example.com:8080", "prod1-broker2.messaging.use.example.com:8080"
* * "prod1-broker3.messaging.use.example.com:8080"]
getActiveBrokers in interface Brokerscluster - 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 errorpublic CompletableFuture<List<String>> getActiveBrokersAsync(String cluster)
Brokers
["prod1-broker1.messaging.use.example.com:8080", "prod1-broker2.messaging.use.example.com:8080",
"prod1-broker3.messaging.use.example.com:8080"]
getActiveBrokersAsync in interface Brokerscluster - Cluster namepublic Map<String,org.apache.pulsar.common.policies.data.NamespaceOwnershipStatus> getOwnedNamespaces(String cluster, String brokerUrl) throws PulsarAdminException
Brokers
{"ns-1":{"broker_assignment":"shared","is_active":"true","is_controlled":"false"},
"ns-2":{"broker_assignment":"primary","is_active":"true","is_controlled":"true"}}
getOwnedNamespaces in interface BrokersPulsarAdminExceptionpublic CompletableFuture<Map<String,org.apache.pulsar.common.policies.data.NamespaceOwnershipStatus>> getOwnedNamespacesAsync(String cluster, String brokerUrl)
Brokers
{"ns-1":{"broker_assignment":"shared","is_active":"true","is_controlled":"false"},
"ns-2":{"broker_assignment":"primary","is_active":"true","is_controlled":"true"}}
getOwnedNamespacesAsync in interface Brokerspublic void updateDynamicConfiguration(String configName, String configValue) throws PulsarAdminException
BrokersServiceConfiguration value
locallyupdateDynamicConfiguration in interface BrokersPulsarAdminExceptionpublic CompletableFuture<Void> updateDynamicConfigurationAsync(String configName, String configValue)
BrokersServiceConfiguration value
locallyupdateDynamicConfigurationAsync in interface Brokerspublic void deleteDynamicConfiguration(String configName) throws PulsarAdminException
BrokersdeleteDynamicConfiguration in interface BrokersPulsarAdminExceptionpublic CompletableFuture<Void> deleteDynamicConfigurationAsync(String configName)
BrokersdeleteDynamicConfigurationAsync in interface Brokerspublic Map<String,String> getAllDynamicConfigurations() throws PulsarAdminException
BrokersgetAllDynamicConfigurations in interface BrokersPulsarAdminExceptionpublic CompletableFuture<Map<String,String>> getAllDynamicConfigurationsAsync()
BrokersgetAllDynamicConfigurationsAsync in interface Brokerspublic List<String> getDynamicConfigurationNames() throws PulsarAdminException
BrokersgetDynamicConfigurationNames in interface BrokersPulsarAdminExceptionpublic CompletableFuture<List<String>> getDynamicConfigurationNamesAsync()
BrokersgetDynamicConfigurationNamesAsync in interface Brokerspublic Map<String,String> getRuntimeConfigurations() throws PulsarAdminException
BrokersgetRuntimeConfigurations in interface BrokersPulsarAdminExceptionpublic CompletableFuture<Map<String,String>> getRuntimeConfigurationsAsync()
BrokersgetRuntimeConfigurationsAsync in interface Brokerspublic org.apache.pulsar.common.conf.InternalConfigurationData getInternalConfigurationData()
throws PulsarAdminException
BrokersgetInternalConfigurationData in interface BrokersPulsarAdminExceptionpublic CompletableFuture<org.apache.pulsar.common.conf.InternalConfigurationData> getInternalConfigurationDataAsync()
BrokersgetInternalConfigurationDataAsync in interface Brokerspublic void backlogQuotaCheck()
throws PulsarAdminException
BrokersbacklogQuotaCheck in interface BrokersPulsarAdminExceptionpublic CompletableFuture<Void> backlogQuotaCheckAsync()
BrokersbacklogQuotaCheckAsync in interface Brokerspublic void healthcheck()
throws PulsarAdminException
Brokershealthcheck in interface BrokersPulsarAdminException - if the healthcheck fails.public CompletableFuture<Void> healthcheckAsync()
BrokershealthcheckAsync in interface Brokerspublic String getVersion() throws PulsarAdminException
BrokersgetVersion in interface BrokersPulsarAdminExceptionCopyright © 2017–2021 Apache Software Foundation. All rights reserved.