[ 
https://issues.apache.org/jira/browse/HADOOP-18122?focusedWorklogId=760997&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-760997
 ]

ASF GitHub Bot logged work on HADOOP-18122:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Apr/22 17:56
            Start Date: 22/Apr/22 17:56
    Worklog Time Spent: 10m 
      Work Description: cheyu2022 commented on code in PR #3987:
URL: https://github.com/apache/hadoop/pull/3987#discussion_r856457617


##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java:
##########
@@ -1466,5 +1476,27 @@ public void setStoragePolicy(Path path, String 
policyName)
         throws IOException {
       throw readOnlyMountTable("setStoragePolicy", path);
     }
+
+    private FsPermission getMountLinkDefaultPermissions() {
+      return PERMISSION_555;
+    }
+
+    private String getMountLinkUserName() {
+      if (mountLinkUserName != null) {
+        return mountLinkUserName;
+      }
+      String username = ugi.getShortUserName();
+      mountLinkUserName = username;
+      return username;
+    }
+
+    private String getMountLinkGroupName() throws IOException {
+      if (mountLinkGroupName != null) {
+        return mountLinkGroupName;
+      }
+      String groupname = ugi.getPrimaryGroupName();
+      mountLinkGroupName = groupname;

Review Comment:
   For your first suggested option:
   I think the idea of setting `mountLinkGroupName` in this function is to not 
call `ugi.getPrimaryGroupName()` every time we call this get method. We set 
`mountLinkGroupName` once if it's null then there's no need to call 
`ugi.getPrimaryGroupName()` again.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 760997)
    Time Spent: 3h 10m  (was: 3h)

> ViewFileSystem fails on determining owning group when primary group doesn't 
> exist for user
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-18122
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18122
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Chentao Yu
>            Assignee: Chentao Yu
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> ViewFileSystem should not fail on determining owning group when primary group 
> doesn't exist for user



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to