You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "errose28 (via GitHub)" <gi...@apache.org> on 2023/01/24 18:33:09 UTC
[GitHub] [ozone] errose28 commented on a diff in pull request #4188: HDDS-7791. Support display and persist owner info to DB
errose28 commented on code in PR #4188:
URL: https://github.com/apache/ozone/pull/4188#discussion_r1085720123
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneKey.java:
##########
@@ -45,6 +45,10 @@ public class OzoneKey {
* Name of the Key.
*/
private final String name;
+ /**
+ * Name of the Key owner.
+ */
+ private final String ownerName;
Review Comment:
In `OzoneVolume` and `OzoneBucket` this field is called `owner`. We should probably use the same name throughout this change.
##########
hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/endpoint/TestBucketList.java:
##########
@@ -108,6 +109,37 @@ public void listSubDir() throws OS3Exception, IOException {
}
+ @Test
+ public void listObjectOwner() throws OS3Exception, IOException {
+
+ UserGroupInformation user1 = UserGroupInformation
+ .createUserForTesting("user1", new String[] {"user1"});
+ UserGroupInformation user2 = UserGroupInformation
+ .createUserForTesting("user2", new String[] {"user2"});
+
+ BucketEndpoint getBucket = new BucketEndpoint();
+ OzoneClient client = new OzoneClientStub();
+ client.getObjectStore().createS3Bucket("b1");
+ OzoneBucket bucket = client.getObjectStore().getS3Bucket("b1");
+
+ UserGroupInformation.setLoginUser(user1);
Review Comment:
In an actual cluster wouldn't the "logged in" user on s3 gateway be s3 gateway itself, not the user making the request? I think what we need to test that s3g is forwarding the user info it was given from the s3 client and OM is storing it correctly.
--
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