YARN-10116. Expose diagnostics in RMAppManager summary
(cherry picked from commit 314e2f9d2e
)
This commit is contained in:
parent
0b19c8e086
commit
aca930402c
|
@ -223,8 +223,8 @@ public class RMAppManager implements EventHandler<RMAppManagerEvent>,
|
|||
== null
|
||||
? ""
|
||||
: app.getApplicationSubmissionContext()
|
||||
.getNodeLabelExpression());
|
||||
|
||||
.getNodeLabelExpression())
|
||||
.add("diagnostics", app.getDiagnostics());
|
||||
return summary;
|
||||
}
|
||||
|
||||
|
|
|
@ -1083,6 +1083,8 @@ public class TestAppManager extends AppManagerTestBase{
|
|||
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);
|
||||
|
@ -1105,6 +1107,8 @@ public class TestAppManager extends AppManagerTestBase{
|
|||
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