Interface SlotMatchingStrategy

    • Method Detail

      • findMatchingSlot

        <T extends TaskManagerSlotInformationOptional<T> findMatchingSlot​(ResourceProfile requestedProfile,
                                                                            Collection<T> freeSlots,
                                                                            java.util.function.Function<InstanceID,​Integer> numberRegisteredSlotsLookup)
        Finds a matching slot for the requested ResourceProfile given the collection of free slots and the total number of slots per TaskExecutor.
        Parameters:
        requestedProfile - to find a matching slot for
        freeSlots - collection of free slots
        numberRegisteredSlotsLookup - lookup for the number of registered slots
        Returns:
        Returns a matching slots or Optional.empty() if there is none