smengcl commented on code in PR #3298:
URL: https://github.com/apache/ozone/pull/3298#discussion_r848659291
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java:
##########
@@ -533,8 +533,18 @@ public void createBucket(
verifyCountsQuota(bucketArgs.getQuotaInNamespace());
verifySpaceQuota(bucketArgs.getQuotaInBytes());
- String owner = bucketArgs.getOwner() == null ?
- ugi.getShortUserName() : bucketArgs.getOwner();
+ String owner;
+ // If S3 auth exists, set owner name to the short user name derived from
the
+ // accessId. Similar to RpcClient#getDEK
+ if (getThreadLocalS3Auth() != null) {
+ UserGroupInformation s3gUGI = UserGroupInformation.createRemoteUser(
+ getThreadLocalS3Auth().getAccessID());
Review Comment:
Yes. In multi-tenancy branch we will just need to replace
`getThreadLocalS3Auth().getAccessID()` with
`getThreadLocalS3Auth().getUserPrincipal()` instead. Similar to this other
patch:
https://github.com/apache/ozone/commit/2e6754f6cc0f077ee6738ca76820ac7c6db391ef#diff-4474d511c0022f836152b8523c020d9448508d8dc5ecce2e5fb4a43b3b192e74R1064-R1068
--
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]