GeorgeJahad commented on code in PR #4134:
URL: https://github.com/apache/ozone/pull/4134#discussion_r1063004564


##########
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneClientAdapterImpl.java:
##########
@@ -603,12 +605,24 @@ public FileStatusAdapter getFileStatus(String path, URI 
uri,
     if (ofsPath.isRoot()) {
       return getFileStatusAdapterForRoot(uri);
     }
+
+    OzoneVolume volume = objectStore.getVolume(ofsPath.getVolumeName());
+
     if (ofsPath.isVolume()) {
-      OzoneVolume volume = objectStore.getVolume(ofsPath.getVolumeName());
       return getFileStatusAdapterForVolume(volume, uri);
     }
     try {
       OzoneBucket bucket = getBucket(ofsPath, false);
+
+      if (ofsPath.isSnapshotPrefix()) {
+        UserGroupInformation ugi =
+            UserGroupInformation.createRemoteUser(volume.getOwner());
+        String owner = ugi.getShortUserName();
+        String group = getGroupName(ugi);

Review Comment:
   I would move these lines into getFileStatusAdapterWithSnapshotPrefix()



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