hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joey Echeverria <j...@cloudera.com>
Subject Re: Mapreduce Job' user
Date Thu, 16 Feb 2012 19:43:22 GMT
Are you using one of the security enabled releases of Hadoop
(0.20.20x,1.0.x,0.23.x,CDH3)? Assuming you are, you need to do something
like the following to impersonate a user:

You'll need to modify your code to use something like this:

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

-Joey

On Thu, Feb 16, 2012 at 12:51 PM, Jose Luis Soler <josocas@gmail.com> wrote:

> Hi All,
>
> Is there some way to force the owner (user name) of a Job sent to a Hadoop
> cluster?
>
> I'm trying to use the following code when configuring the job:
>
> JobConf job = new JobConf();
>
> job.setUser("desiredUserName")**;
>
> but it seems to have no effect as the job owner is sent as the user I'm
> logged into the system.
>
> Even I tried  this:
>
> System.set("user.name", "desiredUserName")
>
> and this, at the command line when running the job:
>
> -Duser.name=desiredUserName
>
> getting no different result.
>
> Thanks for your help.
>
> Jose
>
>


-- 
Joseph Echeverria
Cloudera, Inc.
443.305.9434

Mime
View raw message