cameronlee314 commented on a change in pull request #1553:
URL: https://github.com/apache/samza/pull/1553#discussion_r751588225



##########
File path: 
samza-core/src/main/java/org/apache/samza/coordinator/staticresource/StaticResourceJobCoordinator.java
##########
@@ -212,6 +225,21 @@ void doSetLoggingContextConfig(Config config) {
     LoggingContextHolder.INSTANCE.setConfig(config);
   }
 
+  /**
+   * Sets up {@link DiagnosticsManager} for the job coordinator.
+   */
+  private void setUpDiagnostics(JobModel jobModel) {
+    JobConfig jobConfig = new JobConfig(this.config);
+    String jobName = jobConfig.getName().orElseThrow(() -> new 
ConfigException("Missing job name"));
+    // TODO SAMZA-2705: construct execEnvContainerId for diagnostics
+    Optional<DiagnosticsManager> diagnosticsManager = 
buildDiagnosticsManager(jobName, jobConfig.getJobId(), jobModel,
+        CoordinationConstants.JOB_COORDINATOR_CONTAINER_NAME, 
Optional.empty(), config);
+    if (diagnosticsManager.isPresent()) {
+      diagnosticsManager.get().start();
+      this.currentDiagnosticsManager = diagnosticsManager;

Review comment:
       I moved a few things around in order to group together the assignment of 
instance variables and then group together the `start` lifecycle calls.




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

To unsubscribe, e-mail: commits-unsubscr...@samza.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to