tillrohrmann commented on a change in pull request #6898: [FLINK-10431] Extraction of scheduling-related code from SlotPool into preliminary Scheduler URL: https://github.com/apache/flink/pull/6898#discussion_r227872341
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolGateway.java ########## @@ -145,17 +149,61 @@ * <p>If the returned future must not be completed right away (a.k.a. the slot request * can be queued), allowQueuedScheduling must be set to true. * + * @deprecated this method will be removed once the handling of slot sharing is completely extracted from the slot + * pool into a dedicated {@link Scheduler} component. The call is then replaced by calls to + * {@link #getAvailableSlotsInformation()}, {@link #allocateAvailableSlot(SlotRequestId, AllocationID)}, and + * {@link #requestNewAllocatedSlot(SlotRequestId, ResourceProfile, Time)}. + * * @param slotRequestId identifying the requested slot * @param scheduledUnit for which to allocate slot * @param slotProfile profile that specifies the requirements for the requested slot * @param allowQueuedScheduling true if the slot request can be queued (e.g. the returned future must not be completed) * @param timeout for the operation * @return Future which is completed with the allocated {@link LogicalSlot} */ + @Deprecated CompletableFuture<LogicalSlot> allocateSlot( SlotRequestId slotRequestId, ScheduledUnit scheduledUnit, SlotProfile slotProfile, boolean allowQueuedScheduling, @RpcTimeout Time timeout); + + /** + * Returns a list of {@link SlotInfo} objects about all slots that are currently available in the slot + * pool. + * + * @return a list of {@link SlotInfo} objects about all slots that are currently available in the slot pool. + */ + @Nonnull + List<SlotInfo> getAvailableSlotsInformation(); Review comment: Let's make the return type a `Collection`. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services