hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r907551 - in /hadoop/mapreduce/trunk: CHANGES.txt src/java/org/apache/hadoop/mapreduce/security/token/JobTokenIdentifier.java
Date Mon, 08 Feb 2010 05:03:52 GMT
Author: ddas
Date: Mon Feb  8 05:03:51 2010
New Revision: 907551

URL: http://svn.apache.org/viewvc?rev=907551&view=rev
Log:
MAPREDUCE-1464. Makes a compatible change in JobTokenIdentifier to account for HADOOP-6510.
Contributed by Jitendra Nath Pandey.

Modified:
    hadoop/mapreduce/trunk/CHANGES.txt
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/security/token/JobTokenIdentifier.java

Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=907551&r1=907550&r2=907551&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Mon Feb  8 05:03:51 2010
@@ -49,6 +49,9 @@
     MAPREDUCE-1335. Adds SASL Kerberos/Digest authentication in MapReduce.
     (Kan Zhang via ddas)
 
+    MAPREDUCE-1464. Makes a compatible change in JobTokenIdentifier to
+    account for HADOOP-6510. (Jitendra Nath Pandey via ddas)
+
   IMPROVEMENTS
 
     MAPREDUCE-1198. Alternatively schedule different types of tasks in

Modified: hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/security/token/JobTokenIdentifier.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/security/token/JobTokenIdentifier.java?rev=907551&r1=907550&r2=907551&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/security/token/JobTokenIdentifier.java
(original)
+++ hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapreduce/security/token/JobTokenIdentifier.java
Mon Feb  8 05:03:51 2010
@@ -25,6 +25,7 @@
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.security.token.TokenIdentifier;
+import org.apache.hadoop.security.UserGroupInformation;
 
 /**
  * The token identifier for job token
@@ -57,8 +58,11 @@
   
   /** {@inheritDoc} */
   @Override
-  public Text getUsername() {
-    return getJobId();
+  public UserGroupInformation getUser() {
+    if (jobid == null || "".equals(jobid.toString())) {
+      return null;
+    }
+    return UserGroupInformation.createRemoteUser(jobid.toString());
   }
   
   /**



Mime
View raw message