YARN-10116. Expose diagnostics in RMAppManager summary
This commit is contained in:
parent
ce7b8b5634
commit
314e2f9d2e
@ -227,8 +227,8 @@ public static SummaryBuilder createAppSummary(RMApp app) {
|
||||
== null
|
||||
? ""
|
||||
: app.getApplicationSubmissionContext()
|
||||
.getNodeLabelExpression());
|
||||
|
||||
.getNodeLabelExpression())
|
||||
.add("diagnostics", app.getDiagnostics());
|
||||
return summary;
|
||||
}
|
||||
|
||||
|
@ -1088,6 +1088,8 @@ public void testEscapeApplicationSummary() {
|
||||
new RMAppMetrics(Resource.newInstance(1234, 56),
|
||||
10, 1, resourceSecondsMap, new HashMap<>());
|
||||
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);
|
||||
@ -1110,6 +1112,8 @@ public void testEscapeApplicationSummary() {
|
||||
assertTrue(msg.contains("applicationType=MAPREDUCE"));
|
||||
assertTrue(msg.contains("applicationTags=tag1\\,tag2"));
|
||||
assertTrue(msg.contains("applicationNodeLabel=test"));
|
||||
assertTrue(msg.contains("diagnostics=Multiline" + escaped
|
||||
+ "Diagnostics\\=Diagn\\,ostic"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user