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_r296361678
##########
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<>());
Review comment:
Yup, totally agree.
I've tried to add DiagnosticsStreamMessage pojo to define and enforce a
contract on what does into the stream from the diagnostics-manager.
----------------------------------------------------------------
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]
With regards,
Apache Git Services