You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/09/04 20:37:37 UTC

[GitHub] [hadoop-ozone] smengcl opened a new pull request #1397: HDDS-4211. [OFS] Better owner and group display for listing Ozone volumes and buckets

smengcl opened a new pull request #1397:
URL: https://github.com/apache/hadoop-ozone/pull/1397


   ## What changes were proposed in this pull request?
   
   Improve volumes' and buckets' owner and group display when listing root and in volumes in OFS.
   
   1. Display short name instead of full Kerberos principal.
   2. For volumes, get actual group of the owner (currently it is the volume admin name which is incorrect)
   3. For buckets, display the owner and group of its parent volume.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-4211
   
   ## How was this patch tested?
   
   Will add new a test case.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] xiaoyuyao commented on a change in pull request #1397: HDDS-4211. [OFS] Better owner and group display for listing Ozone volumes and buckets

Posted by GitBox <gi...@apache.org>.
xiaoyuyao commented on a change in pull request #1397:
URL: https://github.com/apache/hadoop-ozone/pull/1397#discussion_r485046310



##########
File path: hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneClientAdapterImpl.java
##########
@@ -972,24 +992,26 @@ private static FileStatusAdapter getFileStatusAdapterForVolume(
    * Generate a FileStatusAdapter for a bucket.
    * @param ozoneBucket OzoneBucket object.
    * @param uri Full URI to OFS root.
+   * @param owner Owner of the parent volume of the bucket.
+   * @param group Group of the parent volume of the bucket.
    * @return FileStatusAdapter for a bucket.
    */
   private static FileStatusAdapter getFileStatusAdapterForBucket(
-      OzoneBucket ozoneBucket, URI uri, String username) {
+      OzoneBucket ozoneBucket, URI uri, String owner, String group) {
     String pathStr = uri.toString() +
         OZONE_URI_DELIMITER + ozoneBucket.getVolumeName() +
         OZONE_URI_DELIMITER + ozoneBucket.getName();
     if (LOG.isDebugEnabled()) {
-      LOG.debug("getFileStatusAdapterForBucket: ozoneBucket={}, pathStr={}, "
-              + "username={}", ozoneBucket.getVolumeName() + OZONE_URI_DELIMITER
-              + ozoneBucket.getName(), pathStr, username);
+      LOG.debug("getFileStatusAdapterForBucket: ozoneBucket={}, pathStr={}",
+          ozoneBucket.getVolumeName() + OZONE_URI_DELIMITER +
+              ozoneBucket.getName(), pathStr);
     }
     Path path = new Path(pathStr);
     return new FileStatusAdapter(0L, path, true, (short)0, 0L,
         ozoneBucket.getCreationTime().getEpochSecond() * 1000, 0L,
-        FsPermission.getDirDefault().toShort(),  // TODO: derive from ACLs later
-        // TODO: revisit owner and group
-        username, username, path, new BlockLocation[0]);
+        FsPermission.getDirDefault().toShort(),
+        // TODO: maybe derive owner and group from ACLs later

Review comment:
       NIT: The comment is not accurate. The ACLs will not be able to provider owner and group information. We might add owner information as bucket metadata in future. 




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] smengcl commented on a change in pull request #1397: HDDS-4211. [OFS] Better owner and group display for listing Ozone volumes and buckets

Posted by GitBox <gi...@apache.org>.
smengcl commented on a change in pull request #1397:
URL: https://github.com/apache/hadoop-ozone/pull/1397#discussion_r485820978



##########
File path: hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneClientAdapterImpl.java
##########
@@ -972,24 +992,26 @@ private static FileStatusAdapter getFileStatusAdapterForVolume(
    * Generate a FileStatusAdapter for a bucket.
    * @param ozoneBucket OzoneBucket object.
    * @param uri Full URI to OFS root.
+   * @param owner Owner of the parent volume of the bucket.
+   * @param group Group of the parent volume of the bucket.
    * @return FileStatusAdapter for a bucket.
    */
   private static FileStatusAdapter getFileStatusAdapterForBucket(
-      OzoneBucket ozoneBucket, URI uri, String username) {
+      OzoneBucket ozoneBucket, URI uri, String owner, String group) {
     String pathStr = uri.toString() +
         OZONE_URI_DELIMITER + ozoneBucket.getVolumeName() +
         OZONE_URI_DELIMITER + ozoneBucket.getName();
     if (LOG.isDebugEnabled()) {
-      LOG.debug("getFileStatusAdapterForBucket: ozoneBucket={}, pathStr={}, "
-              + "username={}", ozoneBucket.getVolumeName() + OZONE_URI_DELIMITER
-              + ozoneBucket.getName(), pathStr, username);
+      LOG.debug("getFileStatusAdapterForBucket: ozoneBucket={}, pathStr={}",
+          ozoneBucket.getVolumeName() + OZONE_URI_DELIMITER +
+              ozoneBucket.getName(), pathStr);
     }
     Path path = new Path(pathStr);
     return new FileStatusAdapter(0L, path, true, (short)0, 0L,
         ozoneBucket.getCreationTime().getEpochSecond() * 1000, 0L,
-        FsPermission.getDirDefault().toShort(),  // TODO: derive from ACLs later
-        // TODO: revisit owner and group
-        username, username, path, new BlockLocation[0]);
+        FsPermission.getDirDefault().toShort(),
+        // TODO: maybe derive owner and group from ACLs later

Review comment:
       Thanks! Removed the comment.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] smengcl merged pull request #1397: HDDS-4211. [OFS] Better owner and group display for listing Ozone volumes and buckets

Posted by GitBox <gi...@apache.org>.
smengcl merged pull request #1397:
URL: https://github.com/apache/hadoop-ozone/pull/1397


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org