Class PhysicalSlotProviderImpl
- java.lang.Object
-
- org.apache.flink.runtime.jobmaster.slotpool.PhysicalSlotProviderImpl
-
- All Implemented Interfaces:
PhysicalSlotProvider
public class PhysicalSlotProviderImpl extends Object implements PhysicalSlotProvider
The provider serves physical slot requests.
-
-
Constructor Summary
Constructors Constructor Description PhysicalSlotProviderImpl(SlotSelectionStrategy slotSelectionStrategy, SlotPool slotPool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<SlotRequestId,CompletableFuture<PhysicalSlotRequest.Result>>allocatePhysicalSlots(Collection<PhysicalSlotRequest> physicalSlotRequests)Submit requests to allocate physical slots.voidcancelSlotRequest(SlotRequestId slotRequestId, Throwable cause)Cancels the slot request with the givenSlotRequestId.voiddisableBatchSlotRequestTimeoutCheck()Disables batch slot request timeout check.
-
-
-
Constructor Detail
-
PhysicalSlotProviderImpl
public PhysicalSlotProviderImpl(SlotSelectionStrategy slotSelectionStrategy, SlotPool slotPool)
-
-
Method Detail
-
disableBatchSlotRequestTimeoutCheck
public void disableBatchSlotRequestTimeoutCheck()
Description copied from interface:PhysicalSlotProviderDisables batch slot request timeout check. Invoked when someone else wants to take over the timeout check responsibility.- Specified by:
disableBatchSlotRequestTimeoutCheckin interfacePhysicalSlotProvider
-
allocatePhysicalSlots
public Map<SlotRequestId,CompletableFuture<PhysicalSlotRequest.Result>> allocatePhysicalSlots(Collection<PhysicalSlotRequest> physicalSlotRequests)
Description copied from interface:PhysicalSlotProviderSubmit 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.
- Specified by:
allocatePhysicalSlotsin interfacePhysicalSlotProvider- Parameters:
physicalSlotRequests- physicalSlotRequest slot requirements- Returns:
- futures of the allocated slots
-
cancelSlotRequest
public void cancelSlotRequest(SlotRequestId slotRequestId, Throwable cause)
Description copied from interface:PhysicalSlotProviderCancels the slot request with the givenSlotRequestId.If the request is already fulfilled with a physical slot, the slot will be released.
- Specified by:
cancelSlotRequestin interfacePhysicalSlotProvider- Parameters:
slotRequestId- identifying the slot request to cancelcause- of the cancellation
-
-