Addendum for YARN-4218. Metric for resource*time that was preempted.
This commit is contained in:
parent
1072232741
commit
ebcb575a12
|
@ -144,6 +144,10 @@ public class TimelineServiceV1Publisher extends AbstractSystemMetricsPublisher {
|
||||||
appMetrics.getVcoreSeconds());
|
appMetrics.getVcoreSeconds());
|
||||||
entity.addOtherInfo(ApplicationMetricsConstants.APP_MEM_METRICS,
|
entity.addOtherInfo(ApplicationMetricsConstants.APP_MEM_METRICS,
|
||||||
appMetrics.getMemorySeconds());
|
appMetrics.getMemorySeconds());
|
||||||
|
entity.addOtherInfo(ApplicationMetricsConstants.APP_MEM_PREEMPT_METRICS,
|
||||||
|
appMetrics.getPreemptedMemorySeconds());
|
||||||
|
entity.addOtherInfo(ApplicationMetricsConstants.APP_CPU_PREEMPT_METRICS,
|
||||||
|
appMetrics.getPreemptedVcoreSeconds());
|
||||||
tEvent.setEventInfo(eventInfo);
|
tEvent.setEventInfo(eventInfo);
|
||||||
|
|
||||||
entity.addEvent(tEvent);
|
entity.addEvent(tEvent);
|
||||||
|
|
|
@ -195,6 +195,12 @@ public class TimelineServiceV2Publisher extends AbstractSystemMetricsPublisher {
|
||||||
entityMetrics.add(getTimelineMetric(
|
entityMetrics.add(getTimelineMetric(
|
||||||
ApplicationMetricsConstants.APP_MEM_METRICS, timestamp,
|
ApplicationMetricsConstants.APP_MEM_METRICS, timestamp,
|
||||||
appMetrics.getMemorySeconds()));
|
appMetrics.getMemorySeconds()));
|
||||||
|
entityMetrics.add(getTimelineMetric(
|
||||||
|
ApplicationMetricsConstants.APP_MEM_PREEMPT_METRICS, timestamp,
|
||||||
|
appMetrics.getPreemptedMemorySeconds()));
|
||||||
|
entityMetrics.add(getTimelineMetric(
|
||||||
|
ApplicationMetricsConstants.APP_CPU_PREEMPT_METRICS, timestamp,
|
||||||
|
appMetrics.getPreemptedVcoreSeconds()));
|
||||||
entityMetrics.add(getTimelineMetric(
|
entityMetrics.add(getTimelineMetric(
|
||||||
ApplicationMetricsConstants.APP_RESOURCE_PREEMPTED_CPU, timestamp,
|
ApplicationMetricsConstants.APP_RESOURCE_PREEMPTED_CPU, timestamp,
|
||||||
appMetrics.getResourcePreempted().getVirtualCores()));
|
appMetrics.getResourcePreempted().getVirtualCores()));
|
||||||
|
|
|
@ -213,7 +213,7 @@ public class TestSystemMetricsPublisherForV2 {
|
||||||
File appFile = new File(outputDirApp, timelineServiceFileName);
|
File appFile = new File(outputDirApp, timelineServiceFileName);
|
||||||
Assert.assertTrue(appFile.exists());
|
Assert.assertTrue(appFile.exists());
|
||||||
verifyEntity(
|
verifyEntity(
|
||||||
appFile, 3, ApplicationMetricsConstants.CREATED_EVENT_TYPE, 6, 0);
|
appFile, 3, ApplicationMetricsConstants.CREATED_EVENT_TYPE, 8, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(timeout = 10000)
|
@Test(timeout = 10000)
|
||||||
|
|
Loading…
Reference in New Issue