YARN-6392. Add submit time to Application Summary log. (Zhihai Xu via wangda)

This commit is contained in:
Wangda Tan 2017-04-24 13:17:35 -07:00
parent 5f934f8386
commit 2ba21d6376
2 changed files with 3 additions and 0 deletions

View File

@ -178,6 +178,7 @@ public class RMAppManager implements EventHandler<RMAppManagerEvent>,
.add("state", app.getState()) .add("state", app.getState())
.add("trackingUrl", trackingUrl) .add("trackingUrl", trackingUrl)
.add("appMasterHost", host) .add("appMasterHost", host)
.add("submitTime", app.getSubmitTime())
.add("startTime", app.getStartTime()) .add("startTime", app.getStartTime())
.add("finishTime", app.getFinishTime()) .add("finishTime", app.getFinishTime())
.add("finalStatus", app.getFinalApplicationStatus()) .add("finalStatus", app.getFinalApplicationStatus())

View File

@ -826,6 +826,7 @@ public class TestAppManager{
when(app.getQueue()).thenReturn("Multiline\n\n\r\rQueueName"); when(app.getQueue()).thenReturn("Multiline\n\n\r\rQueueName");
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);
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);
@ -842,6 +843,7 @@ public class TestAppManager{
Assert.assertTrue(msg.contains("Multiline" + escaped +"AppName")); Assert.assertTrue(msg.contains("Multiline" + escaped +"AppName"));
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("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"));