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



##########
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:
       `null` is not allowed here, otherwise a NPE will occur, as below:
   
https://github.com/apache/pulsar/blob/7b0a6bebe31a8c9f8920758bbbf250dcfe4fda8a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java#L779-L782
   So we used an `empty` Set




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to