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
(cherry picked from commit 6307962b93
)
This commit is contained in:
parent
4488ad5297
commit
ed20c59d36
|
@ -153,9 +153,9 @@ public class TimelineServiceV1Publisher extends AbstractSystemMetricsPublisher {
|
|||
tEvent.setEventInfo(eventInfo);
|
||||
|
||||
entity.addEvent(tEvent);
|
||||
// sync sending of finish event to avoid possibility of saving application
|
||||
// finished state in RMStateStore save without publishing in ATS.
|
||||
putEntity(entity); // sync event so that ATS update is done without fail.
|
||||
|
||||
getDispatcher().getEventHandler().handle(new TimelineV1PublishEvent(
|
||||
SystemMetricsEventType.PUBLISH_ENTITY, entity, app.getApplicationId()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
Loading…
Reference in New Issue