mcvsubbu commented on a change in pull request #3618: Refactor
ControllerPeriodicTask to iterate over tables
URL: https://github.com/apache/incubator-pinot/pull/3618#discussion_r242727625
##########
File path:
pinot-controller/src/main/java/com/linkedin/pinot/controller/helix/core/periodictask/ControllerPeriodicTask.java
##########
@@ -110,7 +110,29 @@ public void onBecomeLeader() {
*
* @param tables List of table names
*/
- public abstract void process(List<String> tables);
+ protected void process(List<String> tables) {
+ preprocess();
+ for (String table : tables) {
+ process(table);
+ }
+ postprocess();
+ }
+
+ /**
+ * This method runs before processing all tables
+ */
+ protected abstract void preprocess();
+
+ /**
+ * Execute the controller periodic task for the given table
+ * @param tableNameWithType
+ */
+ protected abstract void process(String tableNameWithType);
Review comment:
suggest rename to processTable
----------------------------------------------------------------
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]