shekhars-li commented on a change in pull request #1434:
URL: https://github.com/apache/samza/pull/1434#discussion_r503542460



##########
File path: 
samza-rest/src/main/java/org/apache/samza/monitor/SamzaMonitorService.java
##########
@@ -43,16 +51,14 @@
   private static final Logger LOGGER = 
LoggerFactory.getLogger(SamzaMonitorService.class);
   private static final SecureRandom RANDOM = new SecureRandom();
 
-  private final SchedulingProvider scheduler;
   private final SamzaRestConfig config;
   private final MetricsRegistry metricsRegistry;
-
+  private final List<ScheduledExecutorService> scheduledExecutors;
   public SamzaMonitorService(SamzaRestConfig config,
-                             MetricsRegistry metricsRegistry,
-                             SchedulingProvider schedulingProvider) {
+      MetricsRegistry metricsRegistry) {
     this.config = config;
     this.metricsRegistry = metricsRegistry;
-    this.scheduler = schedulingProvider;
+    scheduledExecutors = new ArrayList<>();

Review comment:
       The list is updated in the createdScheduler, to stop all the 
scheduleders in the end when stop is called. 

##########
File path: 
samza-rest/src/main/java/org/apache/samza/monitor/SamzaMonitorService.java
##########
@@ -43,16 +51,14 @@
   private static final Logger LOGGER = 
LoggerFactory.getLogger(SamzaMonitorService.class);
   private static final SecureRandom RANDOM = new SecureRandom();
 
-  private final SchedulingProvider scheduler;
   private final SamzaRestConfig config;
   private final MetricsRegistry metricsRegistry;
-
+  private final List<ScheduledExecutorService> scheduledExecutors;
   public SamzaMonitorService(SamzaRestConfig config,
-                             MetricsRegistry metricsRegistry,
-                             SchedulingProvider schedulingProvider) {
+      MetricsRegistry metricsRegistry) {
     this.config = config;
     this.metricsRegistry = metricsRegistry;
-    this.scheduler = schedulingProvider;
+    scheduledExecutors = new ArrayList<>();

Review comment:
       The list is updated in the createdScheduler, to stop all the schedulers 
in the end when stop is called. 




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


Reply via email to