[
https://issues.apache.org/jira/browse/HADOOP-18122?focusedWorklogId=757273&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-757273
]
ASF GitHub Bot logged work on HADOOP-18122:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 15/Apr/22 02:55
Start Date: 15/Apr/22 02:55
Worklog Time Spent: 10m
Work Description: virajith commented on code in PR #3987:
URL: https://github.com/apache/hadoop/pull/3987#discussion_r851024809
##########
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:
alternatively, just set mountLinkGroupName to ugi.getPrimaryGroupName() in
the constructor if the config is not set?
##########
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:
Instead of setting this, a cleaner way is to declare mountLinkGroupName as a
final variable and return ugi.getPrimaryGroupName() here. Same goes for the
implementation of getMountLinkUserName()
Issue Time Tracking
-------------------
Worklog Id: (was: 757273)
Time Spent: 2h 10m (was: 2h)
> 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: 2h 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.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]