use of org.apache.pulsar.client.admin.PulsarAdminException in project incubator-pulsar by apache.
the class NamespacesImpl method getPermissions.
@Override
public Map<String, Set<AuthAction>> getPermissions(String namespace) throws PulsarAdminException {
try {
NamespaceName ns = NamespaceName.get(namespace);
WebTarget path = namespacePath(ns, "permissions");
return request(path).get(new GenericType<Map<String, Set<AuthAction>>>() {
});
} catch (Exception e) {
throw getApiException(e);
}
}
use of org.apache.pulsar.client.admin.PulsarAdminException in project incubator-pulsar by apache.
the class NamespacesImpl method getNamespaceAntiAffinityGroup.
@Override
public String getNamespaceAntiAffinityGroup(String namespace) throws PulsarAdminException {
try {
NamespaceName ns = NamespaceName.get(namespace);
WebTarget path = namespacePath(ns, "antiAffinity");
return request(path).get(new GenericType<String>() {
});
} catch (Exception e) {
throw getApiException(e);
}
}
use of org.apache.pulsar.client.admin.PulsarAdminException in project incubator-pulsar by apache.
the class PersistentTopicsImpl method revokePermissions.
@Override
public void revokePermissions(String topic, String role) throws PulsarAdminException {
try {
TopicName tn = TopicName.get(topic);
WebTarget path = topicPath(tn, "permissions", role);
request(path).delete(ErrorData.class);
} catch (Exception e) {
throw getApiException(e);
}
}
use of org.apache.pulsar.client.admin.PulsarAdminException in project incubator-pulsar by apache.
the class PersistentTopicsImpl method getPartitionedTopicList.
@Override
public List<String> getPartitionedTopicList(String namespace) throws PulsarAdminException {
try {
NamespaceName ns = NamespaceName.get(namespace);
WebTarget path = namespacePath(ns, "partitioned");
return request(path).get(new GenericType<List<String>>() {
});
} catch (Exception e) {
throw getApiException(e);
}
}
use of org.apache.pulsar.client.admin.PulsarAdminException in project incubator-pulsar by apache.
the class ResourceQuotasImpl method resetNamespaceBundleResourceQuota.
public void resetNamespaceBundleResourceQuota(String namespace, String bundle) throws PulsarAdminException {
try {
NamespaceName ns = NamespaceName.get(namespace);
WebTarget path = namespacePath(ns, bundle);
request(path).delete();
} catch (Exception e) {
throw getApiException(e);
}
}
Aggregations