npawar commented on a change in pull request #3622: Start and stop 
ControllerPeriodicTasks based on leadership changes
URL: https://github.com/apache/incubator-pinot/pull/3622#discussion_r243459215
 
 

 ##########
 File path: 
pinot-core/src/main/java/com/linkedin/pinot/core/periodictask/PeriodicTask.java
 ##########
 @@ -43,4 +43,9 @@
    * @return task name.
    */
   String getTaskName();
+
+  /**
+   * Stop the periodic task
+   */
+  void stop();
 
 Review comment:
   The run() is implicit because of extends Runnable
   
   Refactored this a bit:
   Periodictask has init() and implicit run() and stop()
   When PeriodicTaskScheduler is started, init() and run() are invoked
   When PeriodicTaskSheduler is stopped, stop() is invoked.
   The implementation for all of these is in ControllerPeriodicTask

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to