Class SharingPhysicalSlotRequestBulk
- All Implemented Interfaces:
PhysicalSlotRequestBulk
PhysicalSlotRequestBulk for SlotSharingExecutionSlotAllocator.
The bulk tracks the pending and fulfilled requests by the ExecutionSlotSharingGroup
for which the physical slot is being allocated. SlotSharingExecutionSlotAllocator calls
markFulfilled(ExecutionSlotSharingGroup, AllocationID) to move a pending request to
fulfilled.
Additionally the bulk keeps execution lists for each ExecutionSlotSharingGroup they
belong to. If the cancel(Throwable) method is called (due to fulfillability check
timeout in PhysicalSlotRequestBulkChecker) then the bulk calls back the SlotSharingExecutionSlotAllocator to cancel all logical slots requests for executions of all
bulk's ExecutionSlotSharingGroups.
-
Constructor Summary
ConstructorsConstructorDescriptionSharingPhysicalSlotRequestBulk(Map<ExecutionSlotSharingGroup, List<ExecutionVertexID>> executions, Map<ExecutionSlotSharingGroup, ResourceProfile> pendingRequests, BiConsumer<ExecutionVertexID, Throwable> logicalSlotRequestCanceller) -
Method Summary
Modifier and TypeMethodDescriptionvoidCancels all requests of this bulk.ReturnsAllocationIDs of fulfilled physical slot requests.ReturnsResourceProfiles of pending physical slot requests.voidmarkFulfilled(ExecutionSlotSharingGroup group, AllocationID allocationId) Moves a pending request to fulfilled.
-
Constructor Details
-
SharingPhysicalSlotRequestBulk
public SharingPhysicalSlotRequestBulk(Map<ExecutionSlotSharingGroup, List<ExecutionVertexID>> executions, Map<ExecutionSlotSharingGroup, ResourceProfile> pendingRequests, BiConsumer<ExecutionVertexID, Throwable> logicalSlotRequestCanceller)
-
-
Method Details
-
getPendingRequests
Description copied from interface:PhysicalSlotRequestBulkReturnsResourceProfiles of pending physical slot requests.If a request is pending, it is not fulfilled and vice versa.
PhysicalSlotRequestBulk.getAllocationIdsOfFulfilledRequests()should not return a pending request.- Specified by:
getPendingRequestsin interfacePhysicalSlotRequestBulk
-
getAllocationIdsOfFulfilledRequests
Description copied from interface:PhysicalSlotRequestBulkReturnsAllocationIDs of fulfilled physical slot requests.If a request is fulfilled, it is not pending and vice versa.
PhysicalSlotRequestBulk.getPendingRequests()should not return a fulfilled request.- Specified by:
getAllocationIdsOfFulfilledRequestsin interfacePhysicalSlotRequestBulk
-
cancel
Description copied from interface:PhysicalSlotRequestBulkCancels all requests of this bulk.Canceled bulk is not valid and should not be used afterwards.
- Specified by:
cancelin interfacePhysicalSlotRequestBulk
-
markFulfilled
Moves a pending request to fulfilled.- Parameters:
group-ExecutionSlotSharingGroupof the pending requestallocationId-AllocationIDof the fulfilled request
-