Interface IScheduler

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default java.util.List<org.apache.pulsar.functions.proto.Function.Assignment> rebalance​(java.util.List<org.apache.pulsar.functions.proto.Function.Assignment> currentAssignments, java.util.Set<java.lang.String> workers)
      Rebalances function instances scheduled to workers
      java.util.List<org.apache.pulsar.functions.proto.Function.Assignment> schedule​(java.util.List<org.apache.pulsar.functions.proto.Function.Instance> unassignedFunctionInstances, java.util.List<org.apache.pulsar.functions.proto.Function.Assignment> currentAssignments, java.util.Set<java.lang.String> workers)
      Scheduler schedules assignments to appropriate workers and adds into #resultAssignments
    • Method Detail

      • schedule

        java.util.List<org.apache.pulsar.functions.proto.Function.Assignment> schedule​(java.util.List<org.apache.pulsar.functions.proto.Function.Instance> unassignedFunctionInstances,
                                                                                       java.util.List<org.apache.pulsar.functions.proto.Function.Assignment> currentAssignments,
                                                                                       java.util.Set<java.lang.String> workers)
        Scheduler schedules assignments to appropriate workers and adds into #resultAssignments
        Parameters:
        unassignedFunctionInstances - all unassigned instances
        currentAssignments - current assignments
        workers - current list of active workers
        Returns:
        A list of new assignments
      • rebalance

        default java.util.List<org.apache.pulsar.functions.proto.Function.Assignment> rebalance​(java.util.List<org.apache.pulsar.functions.proto.Function.Assignment> currentAssignments,
                                                                                                java.util.Set<java.lang.String> workers)
        Rebalances function instances scheduled to workers
        Parameters:
        currentAssignments - current assignments
        workers - current list of active workers
        Returns:
        A list of new assignments