You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/04/09 00:37:54 UTC

[GitHub] [incubator-pinot] sunithabeeram commented on a change in pull request #4089: In HelixBrokerStarter, allow custom cluster change handlers

sunithabeeram commented on a change in pull request #4089: In HelixBrokerStarter, allow custom cluster change handlers
URL: https://github.com/apache/incubator-pinot/pull/4089#discussion_r273287673
 
 

 ##########
 File path: pinot-broker/src/main/java/org/apache/pinot/broker/broker/helix/ClusterChangeMediator.java
 ##########
 @@ -116,11 +117,18 @@ public void run() {
     };
   }
 
-  private void processClusterChange(ChangeType changeType, ClusterChangeHandler changeHandler) {
+  private void processClusterChange(ChangeType changeType, List<ClusterChangeHandler> changeHandlers) {
     long startTime = System.currentTimeMillis();
     LOGGER.info("Start processing {} change", changeType);
-    changeHandler.processClusterChange();
-    long endTime = System.currentTimeMillis();
+    long handlerStartTime = startTime;
+    for (ClusterChangeHandler changeHandler : changeHandlers) {
+      changeHandler.processClusterChange(changeType);
 
 Review comment:
   It might be good to handle exceptions from this handler here so we don't skip others if one has an error.

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

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