You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/04/20 16:48:29 UTC

[GitHub] [hadoop] cheyu2022 commented on a diff in pull request #3987: HADOOP-18122. ViewFileSystem fails on determining owning group when primary group doesn't exist for user

cheyu2022 commented on code in PR #3987:
URL: https://github.com/apache/hadoop/pull/3987#discussion_r854352264


##########
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:
   Go with the second option, updated.



-- 
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: common-issues-unsubscribe@hadoop.apache.org

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


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