public class SchedulerImpl extends Object implements Scheduler
| Constructor and Description |
|---|
SchedulerImpl(SlotSelectionStrategy slotSelectionStrategy,
SlotPool slotPool) |
SchedulerImpl(SlotSelectionStrategy slotSelectionStrategy,
SlotPool slotPool,
Map<SlotSharingGroupId,SlotSharingManager> slotSharingManagers) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<LogicalSlot> |
allocateBatchSlot(SlotRequestId slotRequestId,
ScheduledUnit scheduledUnit,
SlotProfile slotProfile)
Allocating batch slot with specific requirement.
|
CompletableFuture<LogicalSlot> |
allocateSlot(SlotRequestId slotRequestId,
ScheduledUnit scheduledUnit,
SlotProfile slotProfile,
org.apache.flink.api.common.time.Time allocationTimeout)
Allocating slot with specific requirement.
|
void |
cancelSlotRequest(SlotRequestId slotRequestId,
SlotSharingGroupId slotSharingGroupId,
Throwable cause)
Cancels the slot request with the given
SlotRequestId and SlotSharingGroupId. |
boolean |
requiresPreviousExecutionGraphAllocations()
Returns true, iff the scheduling strategy of the scheduler requires to know about previous allocations.
|
void |
returnLogicalSlot(LogicalSlot logicalSlot)
Return the given slot to the slot owner.
|
void |
start(ComponentMainThreadExecutor mainThreadExecutor)
Start the scheduler by initializing the main thread executor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitallocateSlotpublic SchedulerImpl(@Nonnull SlotSelectionStrategy slotSelectionStrategy, @Nonnull SlotPool slotPool)
@VisibleForTesting public SchedulerImpl(@Nonnull SlotSelectionStrategy slotSelectionStrategy, @Nonnull SlotPool slotPool, @Nonnull Map<SlotSharingGroupId,SlotSharingManager> slotSharingManagers)
public void start(@Nonnull ComponentMainThreadExecutor mainThreadExecutor)
Schedulerpublic CompletableFuture<LogicalSlot> allocateSlot(SlotRequestId slotRequestId, ScheduledUnit scheduledUnit, SlotProfile slotProfile, org.apache.flink.api.common.time.Time allocationTimeout)
SlotProviderallocateSlot in interface SlotProviderslotRequestId - identifying the slot requestscheduledUnit - The task to allocate the slot forslotProfile - profile of the requested slotallocationTimeout - after which the allocation fails with a timeout exceptionpublic CompletableFuture<LogicalSlot> allocateBatchSlot(SlotRequestId slotRequestId, ScheduledUnit scheduledUnit, SlotProfile slotProfile)
SlotProviderallocateBatchSlot in interface SlotProviderslotRequestId - 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)
SlotProviderSlotRequestId and SlotSharingGroupId.cancelSlotRequest in interface SlotProviderslotRequestId - identifying the slot request to cancelslotSharingGroupId - identifying the slot request to cancelcause - of the cancellationpublic void returnLogicalSlot(LogicalSlot logicalSlot)
SlotOwnerreturnLogicalSlot in interface SlotOwnerlogicalSlot - to returnpublic boolean requiresPreviousExecutionGraphAllocations()
SchedulerrequiresPreviousExecutionGraphAllocations in interface SchedulerCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.