[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to set UserGroupInformation?

Thanks both of you. Our hdfs version is 1.x, so I have to set hadoop.job.ugi. However, I can't find anywhere I can set the config. 
Do you have any ideas?

In fact, except

2018年6月2日星期六,Rong Rong <walterddr@xxxxxxxxx> 写道:
Hi Xinyu,

To add to Till's comment, setting `HADOOP_USER_NAME` in your environment is probably the easiest way if you are using CLI.
If you are launching the job programmatically, e.g. using YarnClusterDescriptor [1], there're many ways to set `HADOOP_USER_NAME` as well, please share more information if you are going down that path.

Alternatively if you are set to use UserGroupInformation and "yarn" is super user in your cluster, you can also try out proxy user approach [2].

Hope this helps.


On Fri, Jun 1, 2018 at 7:25 AM, Till Rohrmann <trohrmann@xxxxxxxxxx> wrote:

have you tried exporting `HADOOP_USER_NAME` with the hbase user before running your application?


On Fri, Jun 1, 2018 at 6:31 AM, Xinyu Zhang <wszxyh@xxxxxxxxx> wrote:
Hi all

I'm trying to write data to HDFS in directory "/home/hbase/XXX". Only "hbase" user can write to the directory.    
The problem is: I submit a job to yarn. The job will be a "yarn" user to write data, while "yarn" user is not allowed to write to  "/home/hbase/XXX".
Is there any method that I can set UserGroupInformation to "hbase"? 


Xinyu Zhang