Forráskód Böngészése

commit ef0a9fae6846d51cd28739daaa8d0b2ad3b0cee4
Author: Devaraj Das <ddas@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)
+


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1077455 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 éve
szülő
commit
64defcf8d3
1 módosított fájl, 6 hozzáadás és 4 törlés
  1. 6 4
      src/mapred/org/apache/hadoop/mapred/TaskTracker.java

+ 6 - 4
src/mapred/org/apache/hadoop/mapred/TaskTracker.java

@@ -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();
   }