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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]