YARN-7765. Fixed an issue that kerberos tgt not found when NM posting timeline events. Contributed by Rohith Sharma K S
This commit is contained in:
parent
649ef7ac33
commit
443523f9c0
|
@ -454,18 +454,15 @@ public class NodeManager extends CompositeService
|
||||||
((NMContext) context).setNodeStatusUpdater(nodeStatusUpdater);
|
((NMContext) context).setNodeStatusUpdater(nodeStatusUpdater);
|
||||||
nmStore.setNodeStatusUpdater(nodeStatusUpdater);
|
nmStore.setNodeStatusUpdater(nodeStatusUpdater);
|
||||||
|
|
||||||
super.serviceInit(conf);
|
// Do secure login before calling init for added services.
|
||||||
// TODO add local dirs to del
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void serviceStart() throws Exception {
|
|
||||||
try {
|
try {
|
||||||
doSecureLogin();
|
doSecureLogin();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new YarnRuntimeException("Failed NodeManager login", e);
|
throw new YarnRuntimeException("Failed NodeManager login", e);
|
||||||
}
|
}
|
||||||
super.serviceStart();
|
|
||||||
|
super.serviceInit(conf);
|
||||||
|
// TODO add local dirs to del
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -100,6 +100,7 @@ public class NMTimelinePublisher extends CompositeService {
|
||||||
this.nmLoginUGI = UserGroupInformation.isSecurityEnabled() ?
|
this.nmLoginUGI = UserGroupInformation.isSecurityEnabled() ?
|
||||||
UserGroupInformation.getLoginUser() :
|
UserGroupInformation.getLoginUser() :
|
||||||
UserGroupInformation.getCurrentUser();
|
UserGroupInformation.getCurrentUser();
|
||||||
|
LOG.info("Initialized NMTimelinePublisher UGI to " + nmLoginUGI);
|
||||||
super.serviceInit(conf);
|
super.serviceInit(conf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -129,6 +129,11 @@ public class HBaseTimelineWriterImpl extends AbstractService implements
|
||||||
new FlowActivityTable().getTableMutator(hbaseConf, conn);
|
new FlowActivityTable().getTableMutator(hbaseConf, conn);
|
||||||
subApplicationTable =
|
subApplicationTable =
|
||||||
new SubApplicationTable().getTableMutator(hbaseConf, conn);
|
new SubApplicationTable().getTableMutator(hbaseConf, conn);
|
||||||
|
|
||||||
|
UserGroupInformation ugi = UserGroupInformation.isSecurityEnabled() ?
|
||||||
|
UserGroupInformation.getLoginUser() :
|
||||||
|
UserGroupInformation.getCurrentUser();
|
||||||
|
LOG.info("Initialized HBaseTimelineWriterImpl UGI to " + ugi);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue