You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/04/01 18:16:27 UTC

[GitHub] [ozone] aswinshakil opened a new pull request #3264: HDDS-6387.[Multi-Tenant] Refactor OMMultiTenantManager and OMTenantRequestHelper

aswinshakil opened a new pull request #3264:
URL: https://github.com/apache/ozone/pull/3264


   ## What changes were proposed in this pull request?
   
   1. Removed unused and unimplemented methods OMMultitenantManager interface. 
   2. Moved functions from OMTenantRequestHelper and combined it with OMMultitenantManagerImpl
   3. Removed duplicated function.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-6387
   
   ## How was this patch tested?
   
   Tested using CI tests.
   


-- 
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: issues-unsubscribe@ozone.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] errose28 commented on a change in pull request #3264: HDDS-6387.[Multi-Tenant] Refactor OMMultiTenantManager and OMTenantRequestHelper

Posted by GitBox <gi...@apache.org>.
errose28 commented on a change in pull request #3264:
URL: https://github.com/apache/ozone/pull/3264#discussion_r840973883



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -3070,13 +3068,10 @@ public TenantUserList listUsersInTenant(String tenantId, String prefix)
       return null;
     }
 
-    if (!multiTenantManager.tenantExists(tenantId)) {
-      // Throw exception to the client, which will handle this gracefully
-      throw new OMException("Tenant '" + tenantId + "' not found",
-          TENANT_NOT_FOUND);
-    }
+    OMMultiTenantManagerImpl.checkTenantExistence(

Review comment:
       I agree. I think the methods moved from OMTenantRequestHelper should be instance methods declared in the interface. All places using them should be able to get an OMMultitenantManager instance from the OzoneManager. Having static methods in OMMultitenantManagerImpl that take an OMMetadataManager doesn't really make sense because the OMMultitenantManager instance already has one as a field.




-- 
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: issues-unsubscribe@ozone.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] smengcl commented on a change in pull request #3264: HDDS-6387.[Multi-Tenant] Refactor OMMultiTenantManager and OMTenantRequestHelper

Posted by GitBox <gi...@apache.org>.
smengcl commented on a change in pull request #3264:
URL: https://github.com/apache/ozone/pull/3264#discussion_r840933489



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -3070,13 +3068,10 @@ public TenantUserList listUsersInTenant(String tenantId, String prefix)
       return null;
     }
 
-    if (!multiTenantManager.tenantExists(tenantId)) {
-      // Throw exception to the client, which will handle this gracefully
-      throw new OMException("Tenant '" + tenantId + "' not found",
-          TENANT_NOT_FOUND);
-    }
+    OMMultiTenantManagerImpl.checkTenantExistence(

Review comment:
       IMO we should avoid calling Impl directly. Either:
   1. use `static` method in the interface (when applicable), or
   2. declare abstract methods in the interface and call that instead.




-- 
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: issues-unsubscribe@ozone.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org