Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop >> mail # user >> Username on Hadoop 20.2


Copy link to this message
-
Re: Username on Hadoop 20.2
(-common-user, +cdh-user)

I'm moving the discussion since this is CDH specific issue. Setting
user.name works for plain 0.20.2, but not the CDH version as it's been
modified to support enabling Kerberos security. You'll need to modify your
code to use something like this:

UserGroupInformation.createRemoteUser("cuser").doAs(new
PrivilegedExceptionAction()... {
 void run() {
   // submit my evil job
 }
};

Where cuser is the name of the user you want everything to run as on the
cluster.

-Joey

On Mon, Jan 16, 2012 at 12:02 PM, Eli Finkelshteyn <[EMAIL PROTECTED]>wrote:

> Hi Folks,
> I'm still lost on this. Has no one wanted or needed to connect to a Hadoop
> cluster from a client machine under a name other than the client's whoami
> before?
>
> Eli
>
>
> On 1/13/12 11:00 AM, Eli Finkelshteyn wrote:
>
>> I tried this, and it doesn't seem to work. Specifically, the way I tested
>> it was adding:
>>
>> <property>
>> <name>user.name</name>
>> <value>[my_username]</value>
>> </property>
>>
>> to core-site.xml. I then tried a test mkdir, and did an ls which showed
>> the new folder had been created by my default whoami client username
>> instead of the new one I had set. Do I need to add it somewhere else, or
>> add something else to the property name? I'm using CDH3 with my Hadoop
>> cluster currently setup with one node in pseudo-distributed mode, in case
>> that helps.
>>
>> Cheers,
>> Eli
>>
>> On 1/12/12 5:39 PM, Joey Echeverria wrote:
>>
>>> Set the user.name property in your core-site.xml on your client nodes.
>>>
>>> -Joey
>>>
>>> On Thu, Jan 12, 2012 at 3:55 PM, Eli Finkelshteyn<iefinkel@gmail.**com<[EMAIL PROTECTED]>>
>>>  wrote:
>>>
>>>> Hi,
>>>> If I have one username on a hadoop cluster and would like to set myself
>>>> up
>>>> to use that same username from every client from which I access the
>>>> cluster,
>>>> how can I go about doing that? I found information about setting
>>>> hadoop.job.ugi, and have tried setting this property variously in
>>>> hdfs-site.xml, core-site.xml, and mapred-site.xml, but nothing seems to
>>>> work. All I want is to be able to look like the same user no matter
>>>> which of
>>>> my machines I connect to the cluster from. How can I do this?
>>>>
>>>> Thanks!
>>>> Eli
>>>>
>>>
>>>
>>>
>>
>
--
Joseph Echeverria
Cloudera, Inc.
443.305.9434