hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject svn commit: r1229749 - in /hadoop/common/branches/branch-0.22/mapreduce: CHANGES.txt src/java/org/apache/hadoop/mapreduce/Cluster.java src/java/org/apache/hadoop/mapreduce/Job.java
Date Tue, 10 Jan 2012 21:37:16 GMT
Author: shv
Date: Tue Jan 10 21:37:15 2012
New Revision: 1229749

URL: http://svn.apache.org/viewvc?rev=1229749&view=rev
Log:
MAPREDUCE-3593. Fix user impersonation. Contributed by Mayank Bansal.

Modified:
    hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt
    hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapreduce/Cluster.java
    hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapreduce/Job.java

Modified: hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt?rev=1229749&r1=1229748&r2=1229749&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt Tue Jan 10 21:37:15 2012
@@ -12,6 +12,8 @@ Release 0.22.1 - Unreleased
 
   BUG FIXES
 
+    MAPREDUCE-3593. Fix user impersonation. (Mayank Bansal via shv)
+
 Release 0.22.0 - 2011-11-29
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapreduce/Cluster.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapreduce/Cluster.java?rev=1229749&r1=1229748&r2=1229749&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapreduce/Cluster.java
(original)
+++ hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapreduce/Cluster.java
Tue Jan 10 21:37:15 2012
@@ -397,4 +397,13 @@ public class Cluster {
     }
   }
 
+  /**
+   * Get the UGI set for the cluster at the time of 
+   * constructing the cluster object with the conf.
+   * @return UserGroupInformation 
+   */
+  public UserGroupInformation getUgi() {
+    return ugi;
+  }
+
 }

Modified: hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapreduce/Job.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapreduce/Job.java?rev=1229749&r1=1229748&r2=1229749&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapreduce/Job.java
(original)
+++ hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapreduce/Job.java
Tue Jan 10 21:37:15 2012
@@ -1039,7 +1039,7 @@ public class Job extends JobContextImpl 
     connect();
     final JobSubmitter submitter = new JobSubmitter(cluster.getFileSystem(),
         cluster.getClient());
-    status = ugi.doAs(new PrivilegedExceptionAction<JobStatus>() {
+    status = this.cluster.getUgi().doAs(new PrivilegedExceptionAction<JobStatus>()
{
       public JobStatus run() throws IOException, InterruptedException, 
       ClassNotFoundException {
         return submitter.submitJobInternal(Job.this, cluster);



Mime
View raw message