public class BrokersImpl extends BaseResource implements Brokers
| Constructor and Description |
|---|
BrokersImpl(javax.ws.rs.client.WebTarget web,
Authentication auth) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getActiveBrokers(String cluster)
Get the list of active brokers in the cluster.
|
Map<String,String> |
getAllDynamicConfigurations()
Get values of all overridden dynamic-configs
|
List<String> |
getDynamicConfigurationNames()
Get list of updatable configuration name
|
InternalConfigurationData |
getInternalConfigurationData()
Get the internal configuration data.
|
Map<String,NamespaceOwnershipStatus> |
getOwnedNamespaces(String cluster,
String brokerUrl)
Get the map of owned namespaces and their status from a single broker in the cluster
|
void |
updateDynamicConfiguration(String configName,
String configValue)
It updates dynamic configuration value in to Zk that triggers watch on
brokers and all brokers can update
ServiceConfiguration value
locally |
asyncDeleteRequest, asyncGetRequest, asyncPostRequest, asyncPutRequest, getApiException, requestpublic BrokersImpl(javax.ws.rs.client.WebTarget web,
Authentication auth)
public List<String> getActiveBrokers(String cluster) throws PulsarAdminException
BrokersGet 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"]
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 Map<String,NamespaceOwnershipStatus> getOwnedNamespaces(String cluster, String brokerUrl) throws PulsarAdminException
BrokersThe 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"}}
getOwnedNamespaces in interface BrokersPulsarAdminExceptionpublic void updateDynamicConfiguration(String configName, String configValue) throws PulsarAdminException
BrokersServiceConfiguration value
locallyupdateDynamicConfiguration in interface BrokersPulsarAdminExceptionpublic Map<String,String> getAllDynamicConfigurations() throws PulsarAdminException
BrokersgetAllDynamicConfigurations in interface BrokersPulsarAdminExceptionpublic List<String> getDynamicConfigurationNames() throws PulsarAdminException
BrokersgetDynamicConfigurationNames in interface BrokersPulsarAdminExceptionpublic InternalConfigurationData getInternalConfigurationData() throws PulsarAdminException
BrokersgetInternalConfigurationData in interface BrokersPulsarAdminExceptionCopyright © 2017–2018 Apache Software Foundation. All rights reserved.