YARN-9222. Print launchTime in ApplicationSummary

(cherry picked from commit 6cace58e21)
(cherry picked from commit bf760e7e81)
(cherry picked from commit 80a08c29adc9d07974bbe8087abcec750d5f7916)
This commit is contained in:
Jonathan Hung 2019-01-24 16:45:05 -08:00
parent 36ff7a4d02
commit bce8f28bec
2 changed files with 3 additions and 0 deletions

View File

@ -181,6 +181,7 @@ public class RMAppManager implements EventHandler<RMAppManagerEvent>,
.add("appMasterHost", host)
.add("submitTime", app.getSubmitTime())
.add("startTime", app.getStartTime())
.add("launchTime", app.getLaunchTime())
.add("finishTime", app.getFinishTime())
.add("finalStatus", app.getFinalApplicationStatus())
.add("memorySeconds", metrics.getMemorySeconds())

View File

@ -829,6 +829,7 @@ public class TestAppManager{
when(app.getState()).thenReturn(RMAppState.RUNNING);
when(app.getApplicationType()).thenReturn("MAPREDUCE");
when(app.getSubmitTime()).thenReturn(1000L);
when(app.getLaunchTime()).thenReturn(2000L);
Map<String, Long> resourceSecondsMap = new HashMap<>();
resourceSecondsMap.put(ResourceInformation.MEMORY_MB.getName(), 16384L);
resourceSecondsMap.put(ResourceInformation.VCORES.getName(), 64L);
@ -849,6 +850,7 @@ public class TestAppManager{
Assert.assertTrue(msg.contains("Multiline" + escaped +"UserName"));
Assert.assertTrue(msg.contains("Multiline" + escaped +"QueueName"));
Assert.assertTrue(msg.contains("submitTime=1000"));
Assert.assertTrue(msg.contains("launchTime=2000"));
Assert.assertTrue(msg.contains("memorySeconds=16384"));
Assert.assertTrue(msg.contains("vcoreSeconds=64"));
Assert.assertTrue(msg.contains("preemptedAMContainers=1"));