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_r286167835
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/clustermanager/ContainerProcessManager.java
 ##########
 @@ -117,8 +131,28 @@ public ContainerProcessManager(Config config, 
SamzaApplicationState state, Metri
 
     ResourceManagerFactory factory = 
getContainerProcessManagerFactory(clusterManagerConfig);
     this.clusterResourceManager = 
checkNotNull(factory.getClusterResourceManager(this, state));
-    this.metrics = new ContainerProcessManagerMetrics(config, state, registry);
 
+    // Initialize metrics
+    this.containerProcessManagerMetrics = new 
ContainerProcessManagerMetrics(config, state, registry);
+    this.jvmMetrics = new JvmMetrics(registry);
+    this.metricsReporters = MetricsReporterLoader.getMetricsReporters(new 
MetricsConfig(config), METRICS_SOURCE_NAME);
+
+    // Creating diagnostics manager and reporter, and wiring it respectively
+    Optional<String> execEnvContainerId = 
Optional.ofNullable(System.getenv("CONTAINER_ID"));
 
 Review comment:
   I defined one, but the principled way to fix this is to define an API in 
ClusterResourceManager called getContainerId() and have 
YarnClusterResourceManager (which is in samza-yarn) return it. 
   I will do that change separately. 

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