tillrohrmann commented on a change in pull request #18286:
URL: https://github.com/apache/flink/pull/18286#discussion_r782893415
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPool.java
##########
@@ -162,9 +163,30 @@ void start(
* @return a newly allocated slot that was previously not available.
*/
@Nonnull
+ default CompletableFuture<PhysicalSlot> requestNewAllocatedSlot(
+ @Nonnull SlotRequestId slotRequestId,
+ @Nonnull ResourceProfile resourceProfile,
+ @Nullable Time timeout) {
+ return requestNewAllocatedSlot(
+ slotRequestId, resourceProfile, Collections.emptyList(),
timeout);
+ }
+
+ /**
+ * Request the allocation of a new slot from the resource manager. This
method will not return a
+ * slot from the already available slots from the pool, but instead will
add a new slot to that
+ * pool that is immediately allocated and returned.
+ *
+ * @param slotRequestId identifying the requested slot
+ * @param resourceProfile resource profile that specifies the resource
requirements for the
+ * requested slot
+ * @param preferredAllocations preferred allocations for the new allocated
slot
+ * @param timeout timeout for the allocation procedure
+ * @return a newly allocated slot that was previously not available.
+ */
CompletableFuture<PhysicalSlot> requestNewAllocatedSlot(
@Nonnull SlotRequestId slotRequestId,
@Nonnull ResourceProfile resourceProfile,
+ @Nonnull Collection<AllocationID> preferredAllocations,
Review comment:
I would leave this for a follow-up task.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]