mcvsubbu commented on a change in pull request #7126:
URL: https://github.com/apache/incubator-pinot/pull/7126#discussion_r665687574
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/TaskMetricsEmitter.java
##########
@@ -86,5 +96,15 @@ protected final void runTask() {
LOGGER.error("Caught exception while getting metrics for task type
{}", taskType, e);
}
}
+
+ // Emit metric to count the number of online minion instances.
+ List<String> onlineInstances =
_pinotHelixResourceManager.getOnlineInstanceList();
+ int onlineMinionInstanceCount = 0;
+ for (String onlineInstance : onlineInstances) {
+ if
(onlineInstance.startsWith(CommonConstants.Helix.PREFIX_OF_MINION_INSTANCE)) {
+ onlineMinionInstanceCount++;
+ }
+ }
+
_controllerMetrics.addValueToGlobalGauge(ControllerGauge.ONLINE_MINION_INSTANCES,
onlineMinionInstanceCount);
Review comment:
Ah, u r right. My bad. I thought we hashed on task type. it turns out we
hashed on task name, so this will be emitted only on one controller.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]