YARN-6424. TimelineCollector is not stopped when an app finishes in RM. Contributed by Varun Saxena.
This commit is contained in:
parent
8c57aeb5b4
commit
1a9439e299
|
@ -179,8 +179,9 @@ public class TimelineServiceV2Publisher extends AbstractSystemMetricsPublisher {
|
||||||
getTimelinelineAppMetrics(appMetrics, finishedTime);
|
getTimelinelineAppMetrics(appMetrics, finishedTime);
|
||||||
entity.setMetrics(entityMetrics);
|
entity.setMetrics(entityMetrics);
|
||||||
|
|
||||||
getDispatcher().getEventHandler().handle(new TimelineV2PublishEvent(
|
getDispatcher().getEventHandler().handle(
|
||||||
SystemMetricsEventType.PUBLISH_ENTITY, entity, app.getApplicationId()));
|
new ApplicationFinishPublishEvent(SystemMetricsEventType.
|
||||||
|
PUBLISH_APPLICATION_FINISHED_ENTITY, entity, app));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Set<TimelineMetric> getTimelinelineAppMetrics(
|
private Set<TimelineMetric> getTimelinelineAppMetrics(
|
||||||
|
@ -452,16 +453,16 @@ public class TimelineServiceV2Publisher extends AbstractSystemMetricsPublisher {
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ApplicationFinishPublishEvent extends TimelineV2PublishEvent {
|
private class ApplicationFinishPublishEvent extends TimelineV2PublishEvent {
|
||||||
private RMAppImpl app;
|
private RMApp app;
|
||||||
|
|
||||||
public ApplicationFinishPublishEvent(SystemMetricsEventType type,
|
public ApplicationFinishPublishEvent(SystemMetricsEventType type,
|
||||||
TimelineEntity entity, RMAppImpl app) {
|
TimelineEntity entity, RMApp app) {
|
||||||
super(type, entity, app.getApplicationId());
|
super(type, entity, app.getApplicationId());
|
||||||
this.app = app;
|
this.app = app;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RMAppImpl getRMAppImpl() {
|
public RMAppImpl getRMAppImpl() {
|
||||||
return app;
|
return (RMAppImpl) app;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue