public abstract class SlotProviderStrategy extends Object
SlotProvider allocation strategies.| Modifier and Type | Field and Description |
|---|---|
protected SlotProvider |
slotProvider |
| Modifier and Type | Method and Description |
|---|---|
abstract CompletableFuture<LogicalSlot> |
allocateSlot(SlotRequestId slotRequestId,
ScheduledUnit scheduledUnit,
SlotProfile slotProfile)
Allocating slot with specific requirement.
|
void |
cancelSlotRequest(SlotRequestId slotRequestId,
SlotSharingGroupId slotSharingGroupId,
Throwable cause)
Cancels the slot request with the given
SlotRequestId and SlotSharingGroupId. |
static SlotProviderStrategy |
from(ScheduleMode scheduleMode,
SlotProvider slotProvider,
org.apache.flink.api.common.time.Time allocationTimeout) |
protected final SlotProvider slotProvider
public abstract CompletableFuture<LogicalSlot> allocateSlot(SlotRequestId slotRequestId, ScheduledUnit scheduledUnit, SlotProfile slotProfile)
slotRequestId - identifying the slot requestscheduledUnit - The task to allocate the slot forslotProfile - profile of the requested slotpublic void cancelSlotRequest(SlotRequestId slotRequestId, @Nullable SlotSharingGroupId slotSharingGroupId, Throwable cause)
SlotRequestId and SlotSharingGroupId.slotRequestId - identifying the slot request to cancelslotSharingGroupId - identifying the slot request to cancelcause - of the cancellationpublic static SlotProviderStrategy from(ScheduleMode scheduleMode, SlotProvider slotProvider, org.apache.flink.api.common.time.Time allocationTimeout)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.