YARN-4863. AHS Security login should be in serviceInit() instead of serviceStart(). Contributed by Junping Du
(cherry picked from commit80182809ae
) (cherry picked from commitffe01e05cd
)
This commit is contained in:
parent
88b56cdfaa
commit
d5ea2462c2
|
@ -86,7 +86,14 @@ public class ApplicationHistoryServer extends CompositeService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void serviceInit(Configuration conf) throws Exception {
|
protected void serviceInit(Configuration conf) throws Exception {
|
||||||
// init timeline services first
|
|
||||||
|
// do security login first.
|
||||||
|
try {
|
||||||
|
doSecureLogin(conf);
|
||||||
|
} catch(IOException ie) {
|
||||||
|
throw new YarnRuntimeException("Failed to login", ie);
|
||||||
|
}
|
||||||
|
// init timeline services
|
||||||
timelineStore = createTimelineStore(conf);
|
timelineStore = createTimelineStore(conf);
|
||||||
addIfService(timelineStore);
|
addIfService(timelineStore);
|
||||||
secretManagerService = createTimelineDelegationTokenSecretManagerService(conf);
|
secretManagerService = createTimelineDelegationTokenSecretManagerService(conf);
|
||||||
|
@ -110,15 +117,6 @@ public class ApplicationHistoryServer extends CompositeService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void serviceStart() throws Exception {
|
protected void serviceStart() throws Exception {
|
||||||
try {
|
|
||||||
doSecureLogin(getConfig());
|
|
||||||
} catch(IOException ie) {
|
|
||||||
throw new YarnRuntimeException("Failed to login", ie);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pauseMonitor != null) {
|
|
||||||
pauseMonitor.start();
|
|
||||||
}
|
|
||||||
super.serviceStart();
|
super.serviceStart();
|
||||||
startWebApp();
|
startWebApp();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue