You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by om...@apache.org on 2011/03/04 05:16:46 UTC

svn commit: r1077455 - /hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/TaskTracker.java

Author: omalley
Date: Fri Mar  4 04:16:45 2011
New Revision: 1077455

URL: http://svn.apache.org/viewvc?rev=1077455&view=rev
Log:
commit ef0a9fae6846d51cd28739daaa8d0b2ad3b0cee4
Author: Devaraj Das <dd...@yahoo-inc.com>
Date:   Sat May 8 16:35:35 2010 -0700

    MAPREDUCE:1664 from https://issues.apache.org/jira/secure/attachment/12444043/mr-1664-20-bugfix.patch
    
    +++ b/YAHOO-CHANGES.txt
    +    MAPREDUCE-1664. Bugfix on top of the previous patch. (ddas)
    +
    +    HDFS-1136. FileChecksumServlets.RedirectServlet doesn't carry forward
    +    the delegation token (boryas)
    +

Modified:
    hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/TaskTracker.java

Modified: hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/TaskTracker.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/TaskTracker.java?rev=1077455&r1=1077454&r2=1077455&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/TaskTracker.java (original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/TaskTracker.java Fri Mar  4 04:16:45 2011
@@ -583,9 +583,7 @@ public class TaskTracker 
    */
   synchronized void initialize() throws IOException, InterruptedException {
     this.fConf = new JobConf(originalConf);
-    UserGroupInformation.setConfiguration(fConf);
-    SecurityUtil.login(fConf, TT_KEYTAB_FILE, TT_USER_NAME);
-
+    
     LOG.info("Starting tasktracker with owner as "
         + getMROwner().getShortUserName());
 
@@ -684,7 +682,8 @@ public class TaskTracker 
         this.fConf, taskController);
 
     this.jobClient = (InterTrackerProtocol) 
-    getMROwner().doAs(new PrivilegedExceptionAction<Object>() {
+    UserGroupInformation.getLoginUser().doAs(
+        new PrivilegedExceptionAction<Object>() {
       public Object run() throws IOException {
         return RPC.waitForProxy(InterTrackerProtocol.class,
             InterTrackerProtocol.versionID,
@@ -1248,6 +1247,9 @@ public class TaskTracker 
     // create user log manager
     setUserLogManager(new UserLogManager(conf));
 
+    UserGroupInformation.setConfiguration(originalConf);
+    SecurityUtil.login(originalConf, TT_KEYTAB_FILE, TT_USER_NAME);
+
     initialize();
   }