public static class SlotPool.ProviderAndOwner extends Object implements SlotOwner, SlotProvider
SlotOwner and SlotProvider interfaces
that delegates methods as RPC calls to the SlotPool's RPC gateway.| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<LogicalSlot> |
allocateSlot(SlotRequestId slotRequestId,
ScheduledUnit task,
boolean allowQueued,
SlotProfile slotProfile,
org.apache.flink.api.common.time.Time timeout)
Allocating slot with specific requirement.
|
CompletableFuture<Acknowledge> |
cancelSlotRequest(SlotRequestId slotRequestId,
SlotSharingGroupId slotSharingGroupId,
Throwable cause)
Cancels the slot request with the given
SlotRequestId and SlotSharingGroupId. |
boolean |
requiresPreviousAllocationsForScheduling() |
CompletableFuture<Boolean> |
returnAllocatedSlot(LogicalSlot slot)
Return the given slot to the slot owner.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitallocateSlotpublic boolean requiresPreviousAllocationsForScheduling()
public CompletableFuture<Boolean> returnAllocatedSlot(LogicalSlot slot)
SlotOwnerreturnAllocatedSlot in interface SlotOwnerslot - to returnpublic CompletableFuture<LogicalSlot> allocateSlot(SlotRequestId slotRequestId, ScheduledUnit task, boolean allowQueued, SlotProfile slotProfile, org.apache.flink.api.common.time.Time timeout)
SlotProviderallocateSlot in interface SlotProviderslotRequestId - identifying the slot requesttask - The task to allocate the slot forallowQueued - Whether allow the task be queued if we do not have enough resourceslotProfile - profile of the requested slottimeout - after which the allocation fails with a timeout exceptionpublic CompletableFuture<Acknowledge> cancelSlotRequest(SlotRequestId slotRequestId, @Nullable SlotSharingGroupId slotSharingGroupId, Throwable cause)
SlotProviderSlotRequestId and SlotSharingGroupId.cancelSlotRequest in interface SlotProviderslotRequestId - identifying the slot request to cancelslotSharingGroupId - identifying the slot request to cancelcause - of the cancellationCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.