|
@@ -583,9 +583,7 @@ public class TaskTracker
|
|
*/
|
|
*/
|
|
synchronized void initialize() throws IOException, InterruptedException {
|
|
synchronized void initialize() throws IOException, InterruptedException {
|
|
this.fConf = new JobConf(originalConf);
|
|
this.fConf = new JobConf(originalConf);
|
|
- UserGroupInformation.setConfiguration(fConf);
|
|
|
|
- SecurityUtil.login(fConf, TT_KEYTAB_FILE, TT_USER_NAME);
|
|
|
|
-
|
|
|
|
|
|
+
|
|
LOG.info("Starting tasktracker with owner as "
|
|
LOG.info("Starting tasktracker with owner as "
|
|
+ getMROwner().getShortUserName());
|
|
+ getMROwner().getShortUserName());
|
|
|
|
|
|
@@ -684,7 +682,8 @@ public class TaskTracker
|
|
this.fConf, taskController);
|
|
this.fConf, taskController);
|
|
|
|
|
|
this.jobClient = (InterTrackerProtocol)
|
|
this.jobClient = (InterTrackerProtocol)
|
|
- getMROwner().doAs(new PrivilegedExceptionAction<Object>() {
|
|
|
|
|
|
+ UserGroupInformation.getLoginUser().doAs(
|
|
|
|
+ new PrivilegedExceptionAction<Object>() {
|
|
public Object run() throws IOException {
|
|
public Object run() throws IOException {
|
|
return RPC.waitForProxy(InterTrackerProtocol.class,
|
|
return RPC.waitForProxy(InterTrackerProtocol.class,
|
|
InterTrackerProtocol.versionID,
|
|
InterTrackerProtocol.versionID,
|
|
@@ -1248,6 +1247,9 @@ public class TaskTracker
|
|
// create user log manager
|
|
// create user log manager
|
|
setUserLogManager(new UserLogManager(conf));
|
|
setUserLogManager(new UserLogManager(conf));
|
|
|
|
|
|
|
|
+ UserGroupInformation.setConfiguration(originalConf);
|
|
|
|
+ SecurityUtil.login(originalConf, TT_KEYTAB_FILE, TT_USER_NAME);
|
|
|
|
+
|
|
initialize();
|
|
initialize();
|
|
}
|
|
}
|
|
|
|
|