smengcl commented on a change in pull request #2857:
URL: https://github.com/apache/ozone/pull/2857#discussion_r765246249



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/tenant/OMTenantRequestHelper.java
##########
@@ -94,26 +99,26 @@ static void checkTenantExistence(OMMetadataManager 
omMetadataManager,
    * Retrieve volume name of the tenant.
    */
   static String getTenantVolumeName(OMMetadataManager omMetadataManager,
-      String tenantName) {
+      String tenantId) {
 
     final OmDBTenantInfo tenantInfo;
     try {
-      tenantInfo = omMetadataManager.getTenantStateTable().get(tenantName);
+      tenantInfo = omMetadataManager.getTenantStateTable().get(tenantId);
     } catch (IOException e) {
       throw new RuntimeException("Potential DB error. Unable to retrieve "
-          + "OmDBTenantInfo entry for tenant '" + tenantName + "'.");
+          + "OmDBTenantInfo entry for tenant '" + tenantId + "'.");
     }
 
     if (tenantInfo == null) {
       throw new RuntimeException("Potential DB error or race condition. "
-          + "OmDBTenantInfo entry is missing for tenant '" + tenantName + 
"'.");
+          + "OmDBTenantInfo entry is missing for tenant '" + tenantId + "'.");
     }
 
-    final String volumeName = tenantInfo.getAccountNamespaceName();
+    final String volumeName = tenantInfo.getBucketNamespaceName();
 
-    if (StringUtils.isEmpty(tenantName)) {
+    if (StringUtils.isEmpty(tenantId)) {

Review comment:
       Done. but throwing `METADATA_ERROR` instead. The `volumeName` field is 
not supposed to be null (but could be "")




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to