You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/12/01 06:14:33 UTC

[GitHub] [pulsar] yuruguo commented on a change in pull request #12351: [pulsar-admin] Add remove-clusters command for namespace

yuruguo commented on a change in pull request #12351:
URL: https://github.com/apache/pulsar/pull/12351#discussion_r748993292



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/Namespaces.java
##########
@@ -271,6 +272,18 @@ public void setNamespaceReplicationClusters(@PathParam("tenant") String tenant,
         internalSetNamespaceReplicationClusters(clusterIds);
     }
 
+    @DELETE
+    @Path("/{tenant}/{namespace}/replication")
+    @ApiOperation(value = "Set the replication clusters for namespace")
+    @ApiResponses(value = {@ApiResponse(code = 403, message = "Don't have admin permission"),
+            @ApiResponse(code = 404, message = "Tenant or cluster or namespace doesn't exist"),
+            @ApiResponse(code = 412, message = "Namespace is not global")})
+    public void removeNamespaceReplicationClusters(@PathParam("tenant") String tenant,
+                                                    @PathParam("namespace") String namespace) {
+        validateNamespaceName(tenant, namespace);
+        internalSetNamespaceReplicationClusters(Lists.newArrayList());

Review comment:
       I added a special `remove method`, ptal again, thx!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org