hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Carlos <jcfernan...@redoop.org>
Subject Re: ViewFileSystem default ugi on mount point
Date Tue, 14 Jan 2014 08:57:02 GMT
What about setting a ldap to have centralized user accounts?


2014/1/13 lohit <lohit.vijayarenu@gmail.com>

> Hi Devs,
>
> ViewFileSystem by default tries to populate ugi information of mount point
> based on the user who is running the command. For example if I execute
> 'hadoop fs -ls /' on '/' which happens to be a ViewFileSystem mountpoint,
> then all mountpoint under '/' would who the permission and owner as 'lohit'
>
> For example this check is coming from ViewFileSystem.java.
>
> public FileStatus getFileStatus(Path f) throws IOException {
>       checkPathIsSlash(f);
>       return new FileStatus(0, true, 0, 0, creationTime, creationTime,
>           PERMISSION_RRR, ugi.getUserName(), ugi.getGroupNames()[0],
>
>           new Path(theInternalDir.fullPath).makeQualified(
>               myUri, null));
>
>
>
> In our clusters we do not create user accounts on worker nodes. Now if any
> Map or Reduce code does getFileStatus on mountpoint they fail when it tries
> to fetch ugi.getGroupNames()[0] with NPE. One option we are thinking is to
> populate this with 'nobody':'nogroup' kind of string if we cannot resolve
> to user/group name instead of failing with NPE. What do you guys think
> about this approach. Any other ideas/suggestion?
>
> --
> Have a Nice Day!
> Lohit
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message