hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinayakumar B (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-15167) [viewfs] ls will fail when user doesn't exist
Date Tue, 16 Jan 2018 10:34:00 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-15167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16326976#comment-16326976
] 

Vinayakumar B commented on HADOOP-15167:
----------------------------------------

In general for HDFS, primary group of a user is not required. Owner group for a file/directory
is inherited from parent, unless set explictly using setOwner() with non-empty group. So FileStatus
for HDFS files will always contain group name. It will not be empty AFAIK.

So in this particular case of ViewFileSystem, primary group is used to create the FileStatus
object for internal read-only mount table inodes, which are just local to this instance of
FileSystem instance.

So using the name of the user itself as group (in case of no primary group) makes sense.

FileStatus code can handle null/empty group/owner. Not a problem from code perspective.

W.r.t compatibility, 

If group is empty, '*ls*' command prints just space in place of group. This breaks the parsers
which depends on 'ls' command output.

 

> [viewfs] ls will fail when user doesn't exist
> ---------------------------------------------
>
>                 Key: HADOOP-15167
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15167
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: viewfs
>    Affects Versions: 2.7.0
>            Reporter: Brahma Reddy Battula
>            Assignee: Brahma Reddy Battula
>            Priority: Major
>         Attachments: HADOOP-15167.patch
>
>
> Have Secure federated cluster with atleast two nameservices
> Configure viewfs related configs 
>  When we run the {{ls}} cmd in HDFS client ,we will call the method: org.apache.hadoop.fs.viewfs.ViewFileSystem.InternalDirOfViewFs#getFileStatus
>  it will try to get the group of the kerberos user. If the node has not this user, it
fails. 
> Throws the following and exits.UserGroupInformation#getPrimaryGroupName
> {code}
> if (groups.isEmpty()) {
>       throw new IOException("There is no primary group for UGI " + this);
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message