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



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/tenant/OMTenantCreateRequest.java
##########
@@ -141,7 +142,9 @@ public OMRequest preExecute(OzoneManager ozoneManager) 
throws IOException {
     // A caveat is that this assumes OM's auth_to_local is the same as
     //  the client's. Maybe move this logic to the client and pass VolumeArgs?
     final String owner = ugi.getShortUserName();
-    final String volumeName = tenantId;  // TODO: Configurable
+    // Volume name defaults to tenant name if unspecified in the request
+    final String volumeName =
+        request.hasTenantName() ? request.getTenantName() : tenantId;

Review comment:
       Good catch.
   
   CreateTenant with custom volume name is not fully implemented yet. It is 
actually out of the scope of this jira (even though I have been writing it 
pieces by pieces as I glimpsed at the TODOs and decided to implement some part 
of it, as I have also done in this PR). Should probably do that in the next 
one, then add proper 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: [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