You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/07/01 01:12:37 UTC

[GitHub] [pulsar] merlimat commented on a change in pull request #7388: Implement rebalance mechanism in Pulsar Functions

merlimat commented on a change in pull request #7388:
URL: https://github.com/apache/pulsar/pull/7388#discussion_r448062262



##########
File path: conf/functions_worker.yml
##########
@@ -78,6 +78,7 @@ numHttpServerThreads: 8
 # function assignment and scheduler
 
 schedulerClassName: "org.apache.pulsar.functions.worker.scheduler.RoundRobinScheduler"
+rebalancerClassName: "org.apache.pulsar.functions.worker.scheduler.RoundRobinScheduler"

Review comment:
       This shouldn't be needed anymore, no?

##########
File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/scheduler/IScheduler.java
##########
@@ -38,4 +39,12 @@
      */
     List<Assignment> schedule(List<Instance> unassignedFunctionInstances, List<Assignment> currentAssignments,
             Set<String> workers);
+
+    /**
+     *
+     * @param currentAssignments
+     * @param workers
+     * @return
+     */
+    List<Function.Assignment> rebalance(List<Function.Assignment> currentAssignments, Set<String> workers);

Review comment:
       Should we have a default implementation that just returns the current assignment?




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