接口 Brokers
-
public interface BrokersAdmin interface for brokers management.
-
-
方法概要
所有方法 实例方法 抽象方法 已过时的方法 修饰符和类型 方法 说明 voidbacklogQuotaCheck()Manually trigger backlogQuotaCheck.java.util.concurrent.CompletableFuture<java.lang.Void>backlogQuotaCheckAsync()Manually trigger backlogQuotaCheck asynchronously.voiddeleteDynamicConfiguration(java.lang.String configName)It deletes dynamic configuration value into ZooKeeper.java.util.concurrent.CompletableFuture<java.lang.Void>deleteDynamicConfigurationAsync(java.lang.String configName)It deletes dynamic configuration value into ZooKeeper asynchronously.java.util.List<java.lang.String>getActiveBrokers(java.lang.String cluster)Get the list of active brokers in the cluster.java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>>getActiveBrokersAsync(java.lang.String cluster)Get the list of active brokers in the cluster asynchronously.java.util.Map<java.lang.String,java.lang.String>getAllDynamicConfigurations()Get values of all overridden dynamic-configs.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String>>getAllDynamicConfigurationsAsync()Get values of all overridden dynamic-configs asynchronously.java.util.List<java.lang.String>getDynamicConfigurationNames()Get list of updatable configuration name.java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>>getDynamicConfigurationNamesAsync()Get list of updatable configuration name asynchronously.InternalConfigurationDatagetInternalConfigurationData()Get the internal configuration data.java.util.concurrent.CompletableFuture<InternalConfigurationData>getInternalConfigurationDataAsync()Get the internal configuration data asynchronously.BrokerInfogetLeaderBroker()Get the information of the leader broker.java.util.concurrent.CompletableFuture<BrokerInfo>getLeaderBrokerAsync()Get the service url of the leader broker asynchronously.java.util.Map<java.lang.String,NamespaceOwnershipStatus>getOwnedNamespaces(java.lang.String cluster, java.lang.String brokerUrl)Get the map of owned namespaces and their status from a single broker in the cluster.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,NamespaceOwnershipStatus>>getOwnedNamespacesAsync(java.lang.String cluster, java.lang.String brokerUrl)Get the map of owned namespaces and their status from a single broker in the cluster asynchronously.java.util.Map<java.lang.String,java.lang.String>getRuntimeConfigurations()Get values of runtime configuration.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String>>getRuntimeConfigurationsAsync()Get values of runtime configuration asynchronously.java.lang.StringgetVersion()Get version of broker.voidhealthcheck()已过时。voidhealthcheck(TopicVersion topicVersion)Run a healthcheck on the broker.java.util.concurrent.CompletableFuture<java.lang.Void>healthcheckAsync()已过时。java.util.concurrent.CompletableFuture<java.lang.Void>healthcheckAsync(TopicVersion topicVersion)Run a healthcheck on the broker asynchronously.voidupdateDynamicConfiguration(java.lang.String configName, java.lang.String configValue)Update a dynamic configuration value into ZooKeeper.java.util.concurrent.CompletableFuture<java.lang.Void>updateDynamicConfigurationAsync(java.lang.String configName, java.lang.String configValue)Update a dynamic configuration value into ZooKeeper asynchronously.
-
-
-
方法详细资料
-
getActiveBrokers
java.util.List<java.lang.String> getActiveBrokers(java.lang.String cluster) throws PulsarAdminExceptionGet the list of active brokers in the cluster. Get the list of active brokers (web service addresses) in the cluster. Response Example:["prod1-broker1.messaging.use.example.com:8080", "prod1-broker2.messaging.use.example.com:8080" * * "prod1-broker3.messaging.use.example.com:8080"]- 参数:
cluster- Cluster name- 返回:
- a list of (host:port)
- 抛出:
PulsarAdminException.NotAuthorizedException- You don't have admin permission to get the list of active brokers in the clusterPulsarAdminException.NotFoundException- Cluster doesn't existPulsarAdminException- Unexpected error
-
getActiveBrokersAsync
java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> getActiveBrokersAsync(java.lang.String cluster)
Get the list of active brokers in the cluster asynchronously. Get the list of active brokers (web service addresses) in the cluster. Response Example:["prod1-broker1.messaging.use.example.com:8080", "prod1-broker2.messaging.use.example.com:8080", "prod1-broker3.messaging.use.example.com:8080"]- 参数:
cluster- Cluster name- 返回:
- a list of (host:port)
-
getLeaderBroker
BrokerInfo getLeaderBroker() throws PulsarAdminException
Get the information of the leader broker. Get the information of the leader broker. Response Example:{serviceUrl:"prod1-broker1.messaging.use.example.com:8080"}- 返回:
- the information of the leader broker.
- 抛出:
PulsarAdminException- Unexpected error
-
getLeaderBrokerAsync
java.util.concurrent.CompletableFuture<BrokerInfo> getLeaderBrokerAsync() throws PulsarAdminException
Get the service url of the leader broker asynchronously. Get the service url of the leader broker. Response Example:{serviceUrl:"prod1-broker1.messaging.use.example.com:8080"}- 返回:
- the service url of the leader broker
- 抛出:
PulsarAdminException- Unexpected error
-
getOwnedNamespaces
java.util.Map<java.lang.String,NamespaceOwnershipStatus> getOwnedNamespaces(java.lang.String cluster, java.lang.String brokerUrl) throws PulsarAdminException
Get the map of owned namespaces and their status from a single broker in the cluster. The map is returned in a JSON object format below Response Example:{"ns-1":{"broker_assignment":"shared","is_active":"true","is_controlled":"false"}, "ns-2":{"broker_assignment":"primary","is_active":"true","is_controlled":"true"}}- 参数:
cluster-brokerUrl-- 返回:
- 抛出:
PulsarAdminException
-
getOwnedNamespacesAsync
java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,NamespaceOwnershipStatus>> getOwnedNamespacesAsync(java.lang.String cluster, java.lang.String brokerUrl)
Get the map of owned namespaces and their status from a single broker in the cluster asynchronously. The map is returned in a JSON object format below Response Example:{"ns-1":{"broker_assignment":"shared","is_active":"true","is_controlled":"false"}, "ns-2":{"broker_assignment":"primary","is_active":"true","is_controlled":"true"}}- 参数:
cluster-brokerUrl-- 返回:
-
updateDynamicConfiguration
void updateDynamicConfiguration(java.lang.String configName, java.lang.String configValue) throws PulsarAdminExceptionUpdate a dynamic configuration value into ZooKeeper. It updates dynamic configuration value in to Zk that triggers watch on brokers and all brokers can updateServiceConfigurationvalue locally- 参数:
configName-configValue-- 抛出:
PulsarAdminException
-
updateDynamicConfigurationAsync
java.util.concurrent.CompletableFuture<java.lang.Void> updateDynamicConfigurationAsync(java.lang.String configName, java.lang.String configValue)Update a dynamic configuration value into ZooKeeper asynchronously. It updates dynamic configuration value in to Zk that triggers watch on brokers and all brokers can updateServiceConfigurationvalue locally- 参数:
configName-configValue-
-
deleteDynamicConfiguration
void deleteDynamicConfiguration(java.lang.String configName) throws PulsarAdminExceptionIt deletes dynamic configuration value into ZooKeeper. It will not impact current value in broker but next time when broker restarts, it applies value from configuration file only.- 参数:
configName-- 抛出:
PulsarAdminException
-
deleteDynamicConfigurationAsync
java.util.concurrent.CompletableFuture<java.lang.Void> deleteDynamicConfigurationAsync(java.lang.String configName)
It deletes dynamic configuration value into ZooKeeper asynchronously. It will not impact current value in broker but next time when broker restarts, it applies value from configuration file only.- 参数:
configName-
-
getDynamicConfigurationNames
java.util.List<java.lang.String> getDynamicConfigurationNames() throws PulsarAdminExceptionGet list of updatable configuration name.- 返回:
- 抛出:
PulsarAdminException
-
getDynamicConfigurationNamesAsync
java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> getDynamicConfigurationNamesAsync()
Get list of updatable configuration name asynchronously.- 返回:
-
getRuntimeConfigurations
java.util.Map<java.lang.String,java.lang.String> getRuntimeConfigurations() throws PulsarAdminExceptionGet values of runtime configuration.- 返回:
- 抛出:
PulsarAdminException
-
getRuntimeConfigurationsAsync
java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String>> getRuntimeConfigurationsAsync()
Get values of runtime configuration asynchronously.- 返回:
-
getAllDynamicConfigurations
java.util.Map<java.lang.String,java.lang.String> getAllDynamicConfigurations() throws PulsarAdminExceptionGet values of all overridden dynamic-configs.- 返回:
- 抛出:
PulsarAdminException
-
getAllDynamicConfigurationsAsync
java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.String>> getAllDynamicConfigurationsAsync()
Get values of all overridden dynamic-configs asynchronously.- 返回:
-
getInternalConfigurationData
InternalConfigurationData getInternalConfigurationData() throws PulsarAdminException
Get the internal configuration data.- 返回:
- internal configuration data.
- 抛出:
PulsarAdminException
-
getInternalConfigurationDataAsync
java.util.concurrent.CompletableFuture<InternalConfigurationData> getInternalConfigurationDataAsync()
Get the internal configuration data asynchronously.- 返回:
- internal configuration data.
-
backlogQuotaCheck
void backlogQuotaCheck() throws PulsarAdminExceptionManually trigger backlogQuotaCheck.
-
backlogQuotaCheckAsync
java.util.concurrent.CompletableFuture<java.lang.Void> backlogQuotaCheckAsync()
Manually trigger backlogQuotaCheck asynchronously.- 返回:
-
healthcheck
@Deprecated void healthcheck() throws PulsarAdminException已过时。Run a healthcheck on the broker.- 抛出:
PulsarAdminException- if the healthcheck fails.
-
healthcheckAsync
@Deprecated java.util.concurrent.CompletableFuture<java.lang.Void> healthcheckAsync()
已过时。Run a healthcheck on the broker asynchronously.
-
healthcheck
void healthcheck(TopicVersion topicVersion) throws PulsarAdminException
Run a healthcheck on the broker.- 抛出:
PulsarAdminException- if the healthcheck fails.
-
healthcheckAsync
java.util.concurrent.CompletableFuture<java.lang.Void> healthcheckAsync(TopicVersion topicVersion)
Run a healthcheck on the broker asynchronously.
-
getVersion
java.lang.String getVersion() throws PulsarAdminExceptionGet version of broker.- 返回:
- version of broker.
- 抛出:
PulsarAdminException
-
-