Created 12-13-2016 05:56 PM
Created 12-13-2016 06:39 PM
@Sean Roberts As noted above, this is controlled by the 'dfs.user.home.dir.prefix' parameter in hdfs-site.xml. However, since this is not a commonly changed parameter, it isn't in the default Ambari configs for HDFS. (It just defaults to the value from hdfs-default.xml.)
To change this value in Ambari, do the following:
dfs.user.home.dir.prefix=/user
That should do what you need, I hope.
Created 12-13-2016 06:10 PM
As per the link: https://hadoop.apache.org/docs/r2.6.0/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml
dfs.user.home.dir.prefix = /user
The directory to prepend to user name to get the user's home direcotry. |
.
Created 12-13-2016 06:29 PM
You can try setting that property "dfs.user.home.dir.prefix" to "hive-site.xml". Is there any specific reason you want to change it?
From command line we can get it's value as
$ hdfs getconf -confKey dfs.user.home.dir.prefix
. I have not tried changing the default "/user" directory of HDFS though.
Created 12-13-2016 06:39 PM
@Sean Roberts As noted above, this is controlled by the 'dfs.user.home.dir.prefix' parameter in hdfs-site.xml. However, since this is not a commonly changed parameter, it isn't in the default Ambari configs for HDFS. (It just defaults to the value from hdfs-default.xml.)
To change this value in Ambari, do the following:
dfs.user.home.dir.prefix=/user
That should do what you need, I hope.
Created 12-13-2016 06:48 PM
As usual, parameter changes only affect things going forward. If users have already been created in the default location, their home directories will not be magically re-created in the new location. This could cause problems, depending on whether processes use the parameter vs using hardwired "/user" prefix. For your site-defined users, you can just move their home directories with dfs commands. For the pre-defined Stack service users, you'll need to experiment to see whether they want their home directories to stay in /user or be moved to value(dfs.user.home.dir.prefix). I would start by leaving them in place, but that's just a guess.
Created 12-14-2016 06:19 PM
One way to see whether any Stack services use hardwired "/user" prefix would be to use Ambari to install the whole Stack on a lab machine. Make a change to "dfs.user.home.dir.prefix", to something other than "/user", during Install Wizard time, BEFORE letting Ambari do the actual installation, thus making sure everything from the beginning sees the non-default value. Let it install, start all the services and let them run a few minutes, then see if anything got created under /user/* in HDFS. Sorry I don't have time to do the experiment right now, but if you do please report the results back here as a comment for others to learn from. If you find services that apparently hardwire the "/user" prefix, I'll enter bugs against those components and try to get them fixed.
Created 12-21-2016 09:39 AM
@Matt Foley - Does HDFS have home references such as ~ or ${HOME} ?