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 understand that `replication_clusters` is not `null`, because it has
been assigned when the namespace is created for v2 namespace, as follows:
https://github.com/apache/pulsar/blob/3e6fedf9b69758c13d92c6ff75a7bd779038543a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java#L131-L134
https://github.com/apache/pulsar/blob/3e6fedf9b69758c13d92c6ff75a7bd779038543a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java#L2025-L2029
and Its default value is `HashSet` for v1 namespace, as below:
https://github.com/apache/pulsar/blob/3e6fedf9b69758c13d92c6ff75a7bd779038543a/pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/Policies.java#L38
--
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]