[ https://issues.apache.org/jira/browse/HADOOP-18122?focusedWorklogId=760989&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-760989 ]
ASF GitHub Bot logged work on HADOOP-18122: ------------------------------------------- Author: ASF GitHub Bot Created on: 22/Apr/22 17:51 Start Date: 22/Apr/22 17:51 Worklog Time Spent: 10m Work Description: cheyu2022 commented on code in PR #3987: URL: https://github.com/apache/hadoop/pull/3987#discussion_r856454695 ########## 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: Actually, for the second option we changed the behavior by setting `mountLinkGroupName` to `ugi.getPrimaryGroupName()` in the constructor, since before we only set it on demand when we call `listStatus()`, `getFileStatus()`, etc... Not sure this behavior change will cause other problems but this failed some unit tests like `testListStatusWithNoGroups` with error "There is no primary group for UGI" when we initialize `InternalDirOfViewFs`. Because in the test we don't expect the error during filesystem initialization. Issue Time Tracking ------------------- Worklog Id: (was: 760989) Time Spent: 3h (was: 2h 50m) > 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 > 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