public class ThrowingSlotProvider extends Object implements SlotProvider
IllegalStateException
on
any method call.Constructor and Description |
---|
ThrowingSlotProvider() |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<LogicalSlot> |
allocateSlot(SlotRequestId slotRequestId,
ScheduledUnit scheduledUnit,
SlotProfile slotProfile,
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 . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
allocateBatchSlot, allocateSlot
public CompletableFuture<LogicalSlot> allocateSlot(SlotRequestId slotRequestId, ScheduledUnit scheduledUnit, SlotProfile slotProfile, Time allocationTimeout)
SlotProvider
allocateSlot
in interface SlotProvider
slotRequestId
- 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 void cancelSlotRequest(SlotRequestId slotRequestId, @Nullable SlotSharingGroupId slotSharingGroupId, Throwable cause)
SlotProvider
SlotRequestId
and SlotSharingGroupId
.cancelSlotRequest
in interface SlotProvider
slotRequestId
- identifying the slot request to cancelslotSharingGroupId
- identifying the slot request to cancelcause
- of the cancellationCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.