Sanil15 commented on a change in pull request #1417:
URL: https://github.com/apache/samza/pull/1417#discussion_r474342587
##########
File path:
samza-core/src/main/java/org/apache/samza/clustermanager/SamzaApplicationState.java
##########
@@ -115,6 +115,13 @@
*/
public final ConcurrentHashMap<String, SamzaResourceStatus> failedProcessors
= new ConcurrentHashMap<>(0);
+
+ /**
+ * Map of the Samza processor ID to the count of failed attempts
+ * Modified by AMRMCallbackThread
+ */
+ public final ConcurrentMap<String, AtomicInteger> perProcessorFailureCount =
new ConcurrentHashMap<>(0);
+
Review comment:
That is correct, we can directly wire metrics registry in
ContainerManager, ContainerAllocator and instantiate new guage and counters in
the code but all metrics related to AM are under this
ContainerProcessManagerMetrics class which holds MetricsRegistry and
SamzaApplicationState, so once does not need to wire MetricsRegistry
individually to each AM class ContainerManager, ContainerAllocator. This is the
justification for maintained this state variable to wire metrics, I feel this
approach is cleaner
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]