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_r284380839
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/clustermanager/ContainerProcessManager.java
 ##########
 @@ -217,12 +250,28 @@ public void stop() {
       Thread.currentThread().interrupt();
     }
 
-    if (metrics != null) {
+    if (this.diagnosticsManager.isDefined()) {
+      try {
+        this.diagnosticsManager.get().stop();
+      } catch (InterruptedException e) {
+        log.error("InterruptedException while stopping diagnosticsManager", e);
+      }
+    }
+
+    if (containerProcessManagerMetrics != null) {
       try {
-        metrics.stop();
-        log.info("Stopped metrics reporters");
+
+        if (this.metricsReporters != null) {
 
 Review comment:
   There are tests that fail if i dont have this. 

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