You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2019/06/17 21:04:46 UTC

[GitHub] [samza] cameronlee314 commented on a change in pull request #1083: SAMZA-2251: Minor diagnostics manager change to emit additional job details

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

 ##########
 File path: samza-core/src/main/scala/org/apache/samza/diagnostics/DiagnosticsManager.java
 ##########
 @@ -68,27 +80,45 @@
   private final String hostname;
   private final Instant resetTime;
 
+  // Job-related params
+  private final int containerCount;
+  private final int containerMemoryMb;
+  private final int containerNumCores;
+  private final int numStores;
+  private final Map<String, ContainerModel> containerModels;
+  private boolean jobParamsEmitted = false;
+
   private SystemProducer systemProducer; // SystemProducer for writing diagnostics data
-  private BoundedList<DiagnosticsExceptionEvent> exceptions; // A BoundedList for storing DiagnosticExceptionEvent
+  private final BoundedList<DiagnosticsExceptionEvent> exceptions; // A BoundedList for storing DiagnosticExceptionEvent
+  private final ConcurrentLinkedQueue<ProcessorStopEvent> containerStops;
+  // A BoundedList for storing DiagnosticExceptionEvent
   private final ScheduledExecutorService scheduler; // Scheduler for pushing data to the diagnostic stream
   private final Duration terminationDuration; // duration to wait when terminating the scheduler
   private final SystemStream diagnosticSystemStream;
 
-  public DiagnosticsManager(String jobName, String jobId, String containerId, String executionEnvContainerId,
-      String taskClassVersion, String samzaVersion, String hostname, SystemStream diagnosticSystemStream,
-      SystemProducer systemProducer, Duration terminationDuration) {
+  public DiagnosticsManager(String jobName, String jobId, Map<String, ContainerModel> containerModels, int containerCount, int containerMemoryMb,
+      int containerNumCores, int numStores, String containerId, String executionEnvContainerId, String taskClassVersion,
+      String samzaVersion, String hostname, SystemStream diagnosticSystemStream, SystemProducer systemProducer,
+      Duration terminationDuration) {
     this.jobName = jobName;
     this.jobId = jobId;
+    this.containerModels = containerModels;
     this.containerId = containerId;
     this.executionEnvContainerId = executionEnvContainerId;
     this.taskClassVersion = taskClassVersion;
     this.samzaVersion = samzaVersion;
     this.hostname = hostname;
     resetTime = Instant.now();
 
+    this.containerCount = containerCount;
 
 Review comment:
   Minor: Could you please use the same ordering for the constructor args as these assignments? i.e. move these assignments up a few lines

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services