YARN-8404. Timeline event publish need to be async to avoid Dispatcher thread leak in case ATS is down. Contributed by Rohith Sharma K S
This commit is contained in:
parent
f4c7c91123
commit
6307962b93
@ -153,9 +153,9 @@ public void appFinished(RMApp app, RMAppState state, long finishedTime) {
|
|||||||
tEvent.setEventInfo(eventInfo);
|
tEvent.setEventInfo(eventInfo);
|
||||||
|
|
||||||
entity.addEvent(tEvent);
|
entity.addEvent(tEvent);
|
||||||
// sync sending of finish event to avoid possibility of saving application
|
|
||||||
// finished state in RMStateStore save without publishing in ATS.
|
getDispatcher().getEventHandler().handle(new TimelineV1PublishEvent(
|
||||||
putEntity(entity); // sync event so that ATS update is done without fail.
|
SystemMetricsEventType.PUBLISH_ENTITY, entity, app.getApplicationId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
Loading…
Reference in New Issue
Block a user