tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject git commit: TEZ-144. Fix ContainerLaunch to always use ContainerTokens, irrespective of security (YARN-617). (sseth)
Date Sun, 19 May 2013 03:44:12 GMT
Updated Branches:
  refs/heads/TEZ-1 de5ee0382 -> 0d5027d00


TEZ-144. Fix ContainerLaunch to always use ContainerTokens, irrespective
of security (YARN-617). (sseth)


Project: http://git-wip-us.apache.org/repos/asf/incubator-tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tez/commit/0d5027d0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tez/tree/0d5027d0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tez/diff/0d5027d0

Branch: refs/heads/TEZ-1
Commit: 0d5027d00d72292ce8acd45441d02b7d5e6e8ecb
Parents: de5ee03
Author: Siddharth Seth <sseth@apache.org>
Authored: Sat May 18 20:43:36 2013 -0700
Committer: Siddharth Seth <sseth@apache.org>
Committed: Sat May 18 20:43:36 2013 -0700

----------------------------------------------------------------------
 .../dag/app/launcher/ContainerLauncherImpl.java    |   16 ++++++--------
 1 files changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/0d5027d0/tez-dag/src/main/java/org/apache/tez/dag/app/launcher/ContainerLauncherImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/launcher/ContainerLauncherImpl.java
b/tez-dag/src/main/java/org/apache/tez/dag/app/launcher/ContainerLauncherImpl.java
index 48a41c4..f1a16b8 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/launcher/ContainerLauncherImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/launcher/ContainerLauncherImpl.java
@@ -360,15 +360,13 @@ public class ContainerLauncherImpl extends AbstractService implements
 
     final InetSocketAddress cmAddr =
         NetUtils.createSocketAddr(containerManagerBindAddr);
-    UserGroupInformation user = UserGroupInformation.getCurrentUser();
-
-    if (UserGroupInformation.isSecurityEnabled()) {
-      Token<ContainerTokenIdentifier> token =
-          ProtoUtils.convertFromProtoFormat(containerToken, cmAddr);
-      // the user in createRemoteUser in this context has to be ContainerID
-      user = UserGroupInformation.createRemoteUser(containerID.toString());
-      user.addToken(token);
-    }
+
+    // the user in createRemoteUser in this context has to be ContainerID
+    UserGroupInformation user = UserGroupInformation
+        .createRemoteUser(containerID.toString());
+    Token<ContainerTokenIdentifier> token = ProtoUtils.convertFromProtoFormat(
+        containerToken, cmAddr);
+    user.addToken(token);
 
     ContainerManager proxy = user
         .doAs(new PrivilegedAction<ContainerManager>() {


Mime
View raw message