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/08/12 05:04:01 UTC

[GitHub] [pulsar] jerrypeng commented on a change in pull request #11643: [PIP-82] [pulsar-broker] Use the qualified NS-name in RG-register/unr…

jerrypeng commented on a change in pull request #11643:
URL: https://github.com/apache/pulsar/pull/11643#discussion_r687390076



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/resourcegroup/ResourceGroupService.java
##########
@@ -233,66 +235,80 @@ public void unRegisterTenant(String resourceGroupName, String tenantName) throws
      * Registers a namespace as a user of a resource group.
      *
      * @param resourceGroupName
-     * @param namespaceName
+     * @param fqNamespaceName (i.e., in "tenant/Namespace" format)
      * @throws if the RG does not exist, or if the NS already references the RG.
      */
-    public void registerNameSpace(String resourceGroupName, String namespaceName) throws PulsarAdminException {
+    public void registerNameSpace(String resourceGroupName, String fqNamespaceName) throws PulsarAdminException {
+        // Since it is a fully qualified NS, we expect a '/' in it.
+        String[] parts = fqNamespaceName.split("/");

Review comment:
       There is already code written to do this.  Please use NamespaceName class to parse this.




-- 
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