YARN-10116. Expose diagnostics in RMAppManager summary
(cherry picked from commit 314e2f9d2e
)
(cherry picked from commit 147897da4b420b4749f3c7b410f4c329632c3352)
(cherry picked from commit fa35b8370ce14c9b8ee911b73fda380817b964fd)
This commit is contained in:
parent
b97fdb7b4c
commit
4fce8c8023
|
@ -208,7 +208,8 @@ public class RMAppManager implements EventHandler<RMAppManagerEvent>,
|
|||
== null
|
||||
? ""
|
||||
: app.getApplicationSubmissionContext()
|
||||
.getNodeLabelExpression());
|
||||
.getNodeLabelExpression())
|
||||
.add("diagnostics", app.getDiagnostics());
|
||||
return summary;
|
||||
}
|
||||
|
||||
|
|
|
@ -844,6 +844,8 @@ public class TestAppManager{
|
|||
new RMAppMetrics(Resource.newInstance(1234, 56),
|
||||
10, 1, resourceSecondsMap, new HashMap<String, Long>());
|
||||
when(app.getRMAppMetrics()).thenReturn(metrics);
|
||||
when(app.getDiagnostics()).thenReturn(new StringBuilder(
|
||||
"Multiline\n\n\r\rDiagnostics=Diagn,ostic"));
|
||||
|
||||
RMAppManager.ApplicationSummary.SummaryBuilder summary =
|
||||
new RMAppManager.ApplicationSummary().createAppSummary(app);
|
||||
|
@ -866,6 +868,8 @@ public class TestAppManager{
|
|||
Assert.assertTrue(msg.contains("applicationType=MAPREDUCE"));
|
||||
Assert.assertTrue(msg.contains("applicationTags=tag1\\,tag2"));
|
||||
Assert.assertTrue(msg.contains("applicationNodeLabel=test"));
|
||||
Assert.assertTrue(msg.contains("diagnostics=Multiline" + escaped
|
||||
+ "Diagnostics\\=Diagn\\,ostic"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue