You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by ss...@apache.org on 2014/01/16 22:17:36 UTC
git commit: TEZ-734. Fix the AppMaster to work in the context of the
App Submitter's UGI. (sseth)
Updated Branches:
refs/heads/master 6e3fdc9ad -> 56f42f4b7
TEZ-734. Fix the AppMaster to work in the context of the App Submitter's
UGI. (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/56f42f4b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tez/tree/56f42f4b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tez/diff/56f42f4b
Branch: refs/heads/master
Commit: 56f42f4b74ad89de59b70603896bee9831c520b0
Parents: 6e3fdc9
Author: Siddharth Seth <ss...@apache.org>
Authored: Thu Jan 16 13:16:42 2014 -0800
Committer: Siddharth Seth <ss...@apache.org>
Committed: Thu Jan 16 13:16:42 2014 -0800
----------------------------------------------------------------------
.../main/java/org/apache/tez/dag/app/DAGAppMaster.java | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/56f42f4b/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java b/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java
index 116bf17..458e468 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java
@@ -200,7 +200,7 @@ public class DAGAppMaster extends AbstractService {
private DAG currentDAG;
private Credentials amTokens = new Credentials(); // Filled during init
- private UserGroupInformation currentUser; // Will be setup during init
+ private UserGroupInformation appMasterUgi;
private AtomicBoolean sessionStopped = new AtomicBoolean(false);
private long sessionTimeoutInterval;
@@ -507,7 +507,7 @@ public class DAGAppMaster extends AbstractService {
DAG newDag =
new DAGImpl(dagId, dagConf, dagPB, dispatcher.getEventHandler(),
taskAttemptListener, dagCredentials, clock,
- currentUser.getShortUserName(),
+ appMasterUgi.getShortUserName(),
taskHeartbeatHandler, context);
if (dagConf.getBoolean(TezConfiguration.TEZ_GENERATE_DAG_VIZ,
@@ -1509,12 +1509,11 @@ public class DAGAppMaster extends AbstractService {
final Configuration conf, String jobUserName) throws IOException,
InterruptedException {
UserGroupInformation.setConfiguration(conf);
- appMaster.currentUser = UserGroupInformation.getCurrentUser();
Credentials credentials = UserGroupInformation.getCurrentUser().getCredentials();
- UserGroupInformation appMasterUgi = UserGroupInformation
+ appMaster.appMasterUgi = UserGroupInformation
.createRemoteUser(jobUserName);
- appMasterUgi.addCredentials(credentials);
+ appMaster.appMasterUgi.addCredentials(credentials);
// Now remove the AM->RM token so tasks don't have it
Iterator<Token<?>> iter = credentials.getAllTokens().iterator();
@@ -1527,7 +1526,7 @@ public class DAGAppMaster extends AbstractService {
appMaster.amTokens = credentials;
- appMasterUgi.doAs(new PrivilegedExceptionAction<Object>() {
+ appMaster.appMasterUgi.doAs(new PrivilegedExceptionAction<Object>() {
@Override
public Object run() throws Exception {
appMaster.init(conf);