hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lohit <lohit.vijayar...@gmail.com>
Subject ViewFileSystem default ugi on mount point
Date Mon, 13 Jan 2014 20:34:10 GMT
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