YARN-10761: Add more event type to RM Dispatcher event metrics. Contributed by Qi Zhu.
This commit is contained in:
parent
d2b0675d61
commit
e7f0e8073b
|
@ -475,12 +475,40 @@ public class ResourceManager extends CompositeService
|
||||||
|
|
||||||
protected Dispatcher createDispatcher() {
|
protected Dispatcher createDispatcher() {
|
||||||
AsyncDispatcher dispatcher = new AsyncDispatcher("RM Event dispatcher");
|
AsyncDispatcher dispatcher = new AsyncDispatcher("RM Event dispatcher");
|
||||||
GenericEventTypeMetrics genericEventTypeMetrics =
|
|
||||||
|
// Add 4 busy event types.
|
||||||
|
GenericEventTypeMetrics
|
||||||
|
nodesListManagerEventTypeMetrics =
|
||||||
GenericEventTypeMetricsManager.
|
GenericEventTypeMetricsManager.
|
||||||
create(dispatcher.getName(), NodesListManagerEventType.class);
|
create(dispatcher.getName(), NodesListManagerEventType.class);
|
||||||
// We can add more
|
dispatcher.addMetrics(nodesListManagerEventTypeMetrics,
|
||||||
dispatcher.addMetrics(genericEventTypeMetrics,
|
nodesListManagerEventTypeMetrics
|
||||||
genericEventTypeMetrics.getEnumClass());
|
.getEnumClass());
|
||||||
|
|
||||||
|
GenericEventTypeMetrics
|
||||||
|
rmNodeEventTypeMetrics =
|
||||||
|
GenericEventTypeMetricsManager.
|
||||||
|
create(dispatcher.getName(), RMNodeEventType.class);
|
||||||
|
dispatcher.addMetrics(rmNodeEventTypeMetrics,
|
||||||
|
rmNodeEventTypeMetrics
|
||||||
|
.getEnumClass());
|
||||||
|
|
||||||
|
GenericEventTypeMetrics
|
||||||
|
rmAppEventTypeMetrics =
|
||||||
|
GenericEventTypeMetricsManager.
|
||||||
|
create(dispatcher.getName(), RMAppEventType.class);
|
||||||
|
dispatcher.addMetrics(rmAppEventTypeMetrics,
|
||||||
|
rmAppEventTypeMetrics
|
||||||
|
.getEnumClass());
|
||||||
|
|
||||||
|
GenericEventTypeMetrics
|
||||||
|
rmAppAttemptEventTypeMetrics =
|
||||||
|
GenericEventTypeMetricsManager.
|
||||||
|
create(dispatcher.getName(), RMAppAttemptEventType.class);
|
||||||
|
dispatcher.addMetrics(rmAppAttemptEventTypeMetrics,
|
||||||
|
rmAppAttemptEventTypeMetrics
|
||||||
|
.getEnumClass());
|
||||||
|
|
||||||
return dispatcher;
|
return dispatcher;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue