Parcourir la source

commit 2df02dcdccfa22bbc700330249a53b6b46de65c4
Author: Devaraj Das <ddas@yahoo-inc.com>
Date: Thu Oct 7 00:11:58 2010 -0700

Added a comment around a doAs


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

Owen O'Malley il y a 14 ans
Parent
commit
d7d1eb014d
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      src/mapred/org/apache/hadoop/mapred/JobLocalizer.java

+ 4 - 0
src/mapred/org/apache/hadoop/mapred/JobLocalizer.java

@@ -382,6 +382,10 @@ public class JobLocalizer {
     //setup the distributed cache
     final long[] sizes = downloadPrivateCache(jConf);
     if (sizes != null) {
+      //the following doAs is required because the DefaultTaskController
+      //calls the localizeJobFiles method in the context of the TaskTracker
+      //process. The JVM authorization check would fail without this
+      //doAs. In the LinuxTC case, this doesn't harm.
       UserGroupInformation ugi = 
         UserGroupInformation.createRemoteUser(jobid.toString());
       ugi.doAs(new PrivilegedExceptionAction<Object>() {