Interface PhysicalSlotProvider
- All Known Implementing Classes:
PhysicalSlotProviderImpl
public interface PhysicalSlotProvider
The provider serves physical slot requests.
-
Method Summary
Modifier and TypeMethodDescriptionallocatePhysicalSlots(Collection<PhysicalSlotRequest> physicalSlotRequests) Submit requests to allocate physical slots.voidcancelSlotRequest(SlotRequestId slotRequestId, Throwable cause) Cancels the slot request with the givenSlotRequestId.voidDisables batch slot request timeout check.
-
Method Details
-
allocatePhysicalSlots
Map<SlotRequestId,CompletableFuture<PhysicalSlotRequest.Result>> allocatePhysicalSlots(Collection<PhysicalSlotRequest> physicalSlotRequests) Submit requests to allocate physical slots.The physical slot can be either allocated from the slots, which are already available for the job, or a new one can be requested from the resource manager.
- Parameters:
physicalSlotRequests- physicalSlotRequest slot requirements- Returns:
- futures of the allocated slots
-
cancelSlotRequest
Cancels the slot request with the givenSlotRequestId.If the request is already fulfilled with a physical slot, the slot will be released.
- Parameters:
slotRequestId- identifying the slot request to cancelcause- of the cancellation
-
disableBatchSlotRequestTimeoutCheck
void disableBatchSlotRequestTimeoutCheck()Disables batch slot request timeout check. Invoked when someone else wants to take over the timeout check responsibility.
-