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:
Sunil G 2018-06-13 16:09:16 +05:30
parent f4c7c91123
commit 6307962b93
1 changed files with 3 additions and 3 deletions

View File

@ -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")