You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2019/06/21 19:11:11 UTC

[GitHub] [samza] rmatharu commented on a change in pull request #1083: SAMZA-2251: Minor diagnostics manager change to emit additional job details

rmatharu commented on a change in pull request #1083: SAMZA-2251: Minor diagnostics manager change to emit additional job details
URL: https://github.com/apache/samza/pull/1083#discussion_r296361245
 
 

 ##########
 File path: samza-core/src/main/scala/org/apache/samza/diagnostics/DiagnosticsManager.java
 ##########
 @@ -141,36 +171,83 @@ public void addExceptionEvent(DiagnosticsExceptionEvent diagnosticsExceptionEven
     this.exceptions.add(diagnosticsExceptionEvent);
   }
 
+  public void addProcessorStopEvent(String processorId, String resourceId, String host, int exitStatus) {
+    this.containerStops.add(new ProcessorStopEvent(processorId, resourceId, host, exitStatus));
+    LOG.info("Added stop event for Container Id: {}, resource Id: {}, host: {}, exitStatus: {}", processorId,
+        resourceId, host, exitStatus);
+  }
+
   private class DiagnosticsStreamPublisher implements Runnable {
 
     @Override
     public void run() {
+
+      Map<String, Map<String, Object>> metricsMessage = new HashMap<>();
+
+      // Publish job-related params (if not already published)
+      if (!jobParamsEmitted) {
+        metricsMessage.putIfAbsent(GROUP_NAME_FOR_DIAGNOSTICS_MANAGER, new HashMap<>());
+        metricsMessage.get(GROUP_NAME_FOR_DIAGNOSTICS_MANAGER).put(CONTAINER_COUNT_METRIC_NAME, containerCount);
 
 Review comment:
   yes, since messages from container and AM can arrive in any order
   publishing from both made the read logic simple
   Since its only published once per container, i didn't think there was significant overhead.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services