public class ClustersImpl extends BaseResource implements Clusters
| Constructor and Description |
|---|
ClustersImpl(javax.ws.rs.client.WebTarget web,
Authentication auth) |
| Modifier and Type | Method and Description |
|---|---|
void |
createCluster(String cluster,
ClusterData clusterData)
Create a new cluster.
|
void |
createFailureDomain(String cluster,
String domainName,
FailureDomain domain)
Create a domain into cluster
|
void |
createNamespaceIsolationPolicy(String cluster,
String policyName,
NamespaceIsolationData namespaceIsolationData)
Create a namespace isolation policy for a cluster
|
void |
deleteCluster(String cluster)
Delete an existing cluster
|
void |
deleteFailureDomain(String cluster,
String domainName)
Delete a domain in cluster
|
void |
deleteNamespaceIsolationPolicy(String cluster,
String policyName)
Delete a namespace isolation policy for a cluster
|
List<BrokerNamespaceIsolationData> |
getBrokersWithNamespaceIsolationPolicy(String cluster)
Returns list of active brokers with namespace-isolation policies attached to it.
|
BrokerNamespaceIsolationData |
getBrokerWithNamespaceIsolationPolicy(String cluster,
String broker)
Returns active broker with namespace-isolation policies attached to it.
|
ClusterData |
getCluster(String cluster)
Get the configuration data for the specified cluster.
|
List<String> |
getClusters()
Get the list of clusters.
|
FailureDomain |
getFailureDomain(String cluster,
String domainName)
Get the domain registered into a cluster
|
Map<String,FailureDomain> |
getFailureDomains(String cluster)
Get all registered domains in cluster
|
Map<String,NamespaceIsolationData> |
getNamespaceIsolationPolicies(String cluster)
Get the namespace isolation policies of a cluster
|
NamespaceIsolationData |
getNamespaceIsolationPolicy(String cluster,
String policyName)
Get a single namespace isolation policy for a cluster
|
Set<String> |
getPeerClusterNames(String cluster)
Get peer-cluster names
|
void |
updateCluster(String cluster,
ClusterData clusterData)
Update the configuration for a cluster.
|
void |
updateFailureDomain(String cluster,
String domainName,
FailureDomain domain)
Update a domain into cluster
|
void |
updateNamespaceIsolationPolicy(String cluster,
String policyName,
NamespaceIsolationData namespaceIsolationData)
Update a namespace isolation policy for a cluster
|
void |
updatePeerClusterNames(String cluster,
LinkedHashSet<String> peerClusterNames)
Update peer cluster names.
|
asyncDeleteRequest, asyncGetRequest, asyncPostRequest, asyncPutRequest, getApiException, requestpublic ClustersImpl(javax.ws.rs.client.WebTarget web,
Authentication auth)
public List<String> getClusters() throws PulsarAdminException
ClustersGet the list of all the Pulsar clusters.
Response Example:
["c1", "c2", "c3"]
getClusters in interface ClustersPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException - Unexpected errorpublic ClusterData getCluster(String cluster) throws PulsarAdminException
ClustersResponse Example:
{ serviceUrl : "http://my-broker.example.com:8080/" }
getCluster in interface Clusterscluster - Cluster namePulsarAdminException.NotAuthorizedException - You don't have admin permission to get the configuration of the clusterPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException - Unexpected errorpublic void createCluster(String cluster, ClusterData clusterData) throws PulsarAdminException
ClustersProvisions a new cluster. This operation requires Pulsar super-user privileges.
The name cannot contain '/' characters.
createCluster in interface Clusterscluster - Cluster nameclusterData - the cluster configuration objectPulsarAdminException.ConflictException - Cluster already existsPulsarAdminException - Unexpected errorpublic void updateCluster(String cluster, ClusterData clusterData) throws PulsarAdminException
ClustersThis operation requires Pulsar super-user privileges.
updateCluster in interface Clusterscluster - Cluster nameclusterData - the cluster configuration objectPulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException - Unexpected errorpublic void updatePeerClusterNames(String cluster, LinkedHashSet<String> peerClusterNames) throws PulsarAdminException
ClustersThis operation requires Pulsar super-user privileges.
updatePeerClusterNames in interface Clusterscluster - Cluster namepeerClusterNames - list of peer cluster namesPulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException - Unexpected errorpublic Set<String> getPeerClusterNames(String cluster) throws PulsarAdminException
ClustersgetPeerClusterNames in interface Clusterscluster - Cluster namePulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.NotFoundException - Domain doesn't existPulsarAdminException.PreconditionFailedException - Cluster doesn't existPulsarAdminException - Unexpected errorpublic void deleteCluster(String cluster) throws PulsarAdminException
ClustersDelete a cluster
deleteCluster in interface Clusterscluster - Cluster namePulsarAdminException.NotAuthorizedException - You don't have admin permissionPulsarAdminException.NotFoundException - Cluster does not existPulsarAdminException.PreconditionFailedException - Cluster is not emptyPulsarAdminException - Unexpected errorpublic Map<String,NamespaceIsolationData> getNamespaceIsolationPolicies(String cluster) throws PulsarAdminException
ClustersgetNamespaceIsolationPolicies in interface Clusterscluster - Cluster namePulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.NotFoundException - Policies don't existPulsarAdminException.PreconditionFailedException - Cluster doesn't existPulsarAdminException - Unexpected errorpublic List<BrokerNamespaceIsolationData> getBrokersWithNamespaceIsolationPolicy(String cluster) throws PulsarAdminException
ClustersgetBrokersWithNamespaceIsolationPolicy in interface ClustersPulsarAdminExceptionpublic BrokerNamespaceIsolationData getBrokerWithNamespaceIsolationPolicy(String cluster, String broker) throws PulsarAdminException
ClustersgetBrokerWithNamespaceIsolationPolicy in interface ClustersPulsarAdminExceptionpublic void createNamespaceIsolationPolicy(String cluster, String policyName, NamespaceIsolationData namespaceIsolationData) throws PulsarAdminException
ClusterscreateNamespaceIsolationPolicy in interface Clusterscluster - Cluster namepolicyName - Policy namenamespaceIsolationData - Namespace isolation policy configurationPulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException.PreconditionFailedException - Cluster doesn't existPulsarAdminException - Unexpected errorpublic void updateNamespaceIsolationPolicy(String cluster, String policyName, NamespaceIsolationData namespaceIsolationData) throws PulsarAdminException
ClustersupdateNamespaceIsolationPolicy in interface Clusterscluster - Cluster namepolicyName - Policy namenamespaceIsolationData - Namespace isolation policy configurationPulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException.PreconditionFailedException - Cluster doesn't existPulsarAdminException - Unexpected errorpublic void deleteNamespaceIsolationPolicy(String cluster, String policyName) throws PulsarAdminException
ClustersdeleteNamespaceIsolationPolicy in interface Clusterscluster - Cluster namepolicyName - Policy namePulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException.PreconditionFailedException - Cluster doesn't existPulsarAdminException - Unexpected errorpublic NamespaceIsolationData getNamespaceIsolationPolicy(String cluster, String policyName) throws PulsarAdminException
ClustersgetNamespaceIsolationPolicy in interface Clusterscluster - Cluster namepolicyName - Policy namePulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.NotFoundException - Policy doesn't existPulsarAdminException.PreconditionFailedException - Cluster doesn't existPulsarAdminException - Unexpected errorpublic void createFailureDomain(String cluster, String domainName, FailureDomain domain) throws PulsarAdminException
ClusterscreateFailureDomain in interface Clusterscluster - Cluster namedomainName - domain namePulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.ConflictException - Broker already exist into other domainPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException.PreconditionFailedException - Cluster doesn't existPulsarAdminException - Unexpected errorpublic void updateFailureDomain(String cluster, String domainName, FailureDomain domain) throws PulsarAdminException
ClustersupdateFailureDomain in interface Clusterscluster - Cluster namedomainName - domain namePulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.ConflictException - Broker already exist into other domainPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException.PreconditionFailedException - Cluster doesn't existPulsarAdminException - Unexpected errorpublic void deleteFailureDomain(String cluster, String domainName) throws PulsarAdminException
ClustersdeleteFailureDomain in interface Clusterscluster - Cluster namedomainName - Domain namePulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.NotFoundException - Cluster doesn't existPulsarAdminException.PreconditionFailedException - Cluster doesn't existPulsarAdminException - Unexpected errorpublic Map<String,FailureDomain> getFailureDomains(String cluster) throws PulsarAdminException
ClustersgetFailureDomains in interface Clusterscluster - Cluster namePulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.NotFoundException - Cluster don't existPulsarAdminException - Unexpected errorpublic FailureDomain getFailureDomain(String cluster, String domainName) throws PulsarAdminException
ClustersgetFailureDomain in interface Clusterscluster - Cluster namePulsarAdminException.NotAuthorizedException - You don't have admin permission to create the clusterPulsarAdminException.NotFoundException - Domain doesn't existPulsarAdminException.PreconditionFailedException - Cluster doesn't existPulsarAdminException - Unexpected errorCopyright © 2017–2018 Apache Software Foundation. All rights reserved.