public class RoundRobinScheduler extends Object implements IScheduler
| Constructor and Description |
|---|
RoundRobinScheduler() |
| Modifier and Type | Method and Description |
|---|---|
List<org.apache.pulsar.functions.proto.Function.Assignment> |
rebalance(List<org.apache.pulsar.functions.proto.Function.Assignment> currentAssignments,
Set<String> workers)
Rebalances function instances scheduled to workers.
|
List<org.apache.pulsar.functions.proto.Function.Assignment> |
schedule(List<org.apache.pulsar.functions.proto.Function.Instance> unassignedFunctionInstances,
List<org.apache.pulsar.functions.proto.Function.Assignment> currentAssignments,
Set<String> workers)
Scheduler schedules assignments to appropriate workers and adds into #resultAssignments.
|
public List<org.apache.pulsar.functions.proto.Function.Assignment> schedule(List<org.apache.pulsar.functions.proto.Function.Instance> unassignedFunctionInstances, List<org.apache.pulsar.functions.proto.Function.Assignment> currentAssignments, Set<String> workers)
ISchedulerschedule in interface ISchedulerunassignedFunctionInstances - all unassigned instancescurrentAssignments - current assignmentsworkers - current list of active workerspublic List<org.apache.pulsar.functions.proto.Function.Assignment> rebalance(List<org.apache.pulsar.functions.proto.Function.Assignment> currentAssignments, Set<String> workers)
ISchedulerrebalance in interface ISchedulercurrentAssignments - current assignmentsworkers - current list of active workersCopyright © 2017–2022 Apache Software Foundation. All rights reserved.