YARN-9222. Print launchTime in ApplicationSummary

(cherry picked from commit 6cace58e212d3ee0aec988926a5a17c9cc58e645)
(cherry picked from commit bf760e7e81f8e02ad413c470fccf78aaa9cb9f86)
(cherry picked from commit 80a08c29adc9d07974bbe8087abcec750d5f7916)
(cherry picked from commit c71054c428b3abe00507792099e13a2dad337697)
This commit is contained in:
Jonathan Hung 2019-01-24 16:45:05 -08:00
parent 7bca49c0d2
commit 338dbbedf7
2 changed files with 3 additions and 0 deletions

View File

@ -179,6 +179,7 @@ public static SummaryBuilder createAppSummary(RMApp app) {
.add("appMasterHost", host) .add("appMasterHost", host)
.add("submitTime", app.getSubmitTime()) .add("submitTime", app.getSubmitTime())
.add("startTime", app.getStartTime()) .add("startTime", app.getStartTime())
.add("launchTime", app.getLaunchTime())
.add("finishTime", app.getFinishTime()) .add("finishTime", app.getFinishTime())
.add("finalStatus", app.getFinalApplicationStatus()) .add("finalStatus", app.getFinalApplicationStatus())
.add("memorySeconds", metrics.getMemorySeconds()) .add("memorySeconds", metrics.getMemorySeconds())

View File

@ -826,6 +826,7 @@ public void testEscapeApplicationSummary() {
when(app.getState()).thenReturn(RMAppState.RUNNING); when(app.getState()).thenReturn(RMAppState.RUNNING);
when(app.getApplicationType()).thenReturn("MAPREDUCE"); when(app.getApplicationType()).thenReturn("MAPREDUCE");
when(app.getSubmitTime()).thenReturn(1000L); when(app.getSubmitTime()).thenReturn(1000L);
when(app.getLaunchTime()).thenReturn(2000L);
RMAppMetrics metrics = RMAppMetrics metrics =
new RMAppMetrics(Resource.newInstance(1234, 56), new RMAppMetrics(Resource.newInstance(1234, 56),
10, 1, 16384, 64, 0, 0); 10, 1, 16384, 64, 0, 0);
@ -843,6 +844,7 @@ public void testEscapeApplicationSummary() {
Assert.assertTrue(msg.contains("Multiline" + escaped +"UserName")); Assert.assertTrue(msg.contains("Multiline" + escaped +"UserName"));
Assert.assertTrue(msg.contains("Multiline" + escaped +"QueueName")); Assert.assertTrue(msg.contains("Multiline" + escaped +"QueueName"));
Assert.assertTrue(msg.contains("submitTime=1000")); Assert.assertTrue(msg.contains("submitTime=1000"));
Assert.assertTrue(msg.contains("launchTime=2000"));
Assert.assertTrue(msg.contains("memorySeconds=16384")); Assert.assertTrue(msg.contains("memorySeconds=16384"));
Assert.assertTrue(msg.contains("vcoreSeconds=64")); Assert.assertTrue(msg.contains("vcoreSeconds=64"));
Assert.assertTrue(msg.contains("preemptedAMContainers=1")); Assert.assertTrue(msg.contains("preemptedAMContainers=1"));