You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pinot.apache.org by GitBox <gi...@apache.org> on 2018/12/18 22:44:04 UTC

[GitHub] npawar commented on a change in pull request #3618: Refactor ControllerPeriodicTask to iterate over tables

npawar commented on a change in pull request #3618: Refactor ControllerPeriodicTask to iterate over tables 
URL: https://github.com/apache/incubator-pinot/pull/3618#discussion_r242734006
 
 

 ##########
 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:
   done

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pinot.apache.org
For additional commands, e-mail: dev-help@pinot.apache.org