hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petru Dimulescu <petru.dimule...@gmail.com>
Subject Re: cli login as different user
Date Tue, 13 Mar 2012 13:17:42 GMT
Hi, thank for your answer.

Actually my use case is for administrative tasks. I am myself user 
'petru' on my laptop, connecting on an HDFS cluster whose superuser is 
named 'hadoop', only because the Java Hadoop namenode process was 
installed and is running under an account called 'hadoop'.

So if I don't specify anything, the hadoop.sh script on my laptop logs 
me in as user 'petru', and I can't grant rights or do other 
administrative taks. I'd like to be able to tell the hadoop HDFS client: 
let me connect as user 'hadoop' instead of 
System.getProperty('user.name') which turns out to be 'petru' on my 
laptop. The only way I can do this right now is login on a Unix station 
(the namenode server or any Unix station in fact, that happens to have 
an account called 'hadoop' and call that script. It doesn't feel right.

I'm using 0.23. At the programmatic level there is a 
UserGroupInformation.createRemoteUser and other safer ways of changing 
identity. I was wondering if the official client has a switch for doing 
this, it seems to be a pretty common use case to me.

Regards,
Petru

On 3/12/12 3:58 PM, Harsh J wrote:
> Petru,
>
> You'll have to ensure (or provide) that your regular users can also
> access the same script.
>
> One way is to have regular package installations - Apache Bigtop helps
> provide Apache Hadoop packages for consumption, for instance - for
> RPM/DEB installations and more, and you can use those.
>
> The other alternative, if you use tarballs, is to make sure all your
> hadoop users have the $HADOOP_HOME/bin on their PATH, so they can use
> the command as any other first class command from their shell (without
> needing to specify a path).
>
> Or are you seeing issues when you try the command as non-installation
> user? If so, what error do you observe?
>
> On Mon, Mar 12, 2012 at 8:24 PM, Petru Dimulescu
> <petru.dimulescu@gmail.com>  wrote:
>> Hi, how can I run any hadoop.sh command (e.g. hadoop fs -ls /) as
>> non-default user (is there some CLI switch, or evironment variable) ?
>>
>> Thanks
>
>


Mime
View raw message