rmatharu commented on a change in pull request #1021: Adding writing of 
container.metadata file, and moving exception writing logic to 
DiagnosticsManager
URL: https://github.com/apache/samza/pull/1021#discussion_r284383033
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/runtime/ContainerLaunchUtil.java
 ##########
 @@ -90,15 +98,24 @@ private static void run(
         startpointManager = Optional.of(new StartpointManager(new 
NamespaceAwareCoordinatorStreamStore(coordinatorStreamStore, 
StartpointManager.NAMESPACE)));
       }
 
+      Map<String, MetricsReporter> metricsReporters = 
loadMetricsReporters(appDesc, containerId, config);
+
+      // Creating diagnostics manager and reporter, and wiring it respectively
+      Optional<Tuple2<DiagnosticsManager, MetricsSnapshotReporter>> 
diagnosticsManagerReporterPair = 
DiagnosticsUtil.buildDiagnosticsManager(jobName, jobId, containerId, 
execEnvContainerId, config);
+      Option<DiagnosticsManager> diagnosticsManager = Option.empty();
+      if (diagnosticsManagerReporterPair.isPresent()) {
+        diagnosticsManager = 
Option.apply(diagnosticsManagerReporterPair.get()._1());
+        
metricsReporters.put(MetricsConfig.METRICS_SNAPSHOT_REPORTER_NAME_FOR_DIAGNOSTICS(),
 diagnosticsManagerReporterPair.get()._2());
 
 Review comment:
   Not changing right now since its used in li-samza-rewriter.

----------------------------------------------------------------
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

Reply via email to