HDFS Home Directory

前端 未结 2 901
别那么骄傲
别那么骄傲 2020-12-10 19:59

I have setup a single node multi-user hadoop cluster. In my cluster, there is an admin user that is responsible for running the cluster (superuser). All other users are all

相关标签:
2条回答
  • 2020-12-10 20:23

    I'm not sure this is something that can be configured - the source for DistributedFileSystem(line 150) has a call for getHomeDirectory that seems to be hard-coded:

    @Override
    public Path getHomeDirectory() {
      return makeQualified(new Path("/user/" + dfs.ugi.getShortUserName()));
    }
    

    You do have two possible choices if you want to be able to change this:

    • Submit a ticket to hadoop asking for a new feature - See this link
    • Amend the source yourself and re-build + re-distribute the hadoop-core jar across your cluster (simple in your single node pseudo cluster)
    0 讨论(0)
  • 2020-12-10 20:31

    tapan, Each user has a "home" directory in HDFS located at /user/username. For example, If you type hadoop fs -ls, it will take you the current HDFS user directory. I checked it on single with two users.

    Coming to unix like file (/etc/passwd) setting, i did not know. But, it is really interesting. As chris said, we can add new feature like, introduce user-admin-site.xml like configuration file and add groups, users their permissions on directories, home directory etc. Really intertesting, we have o try this...

    0 讨论(0)
提交回复
热议问题