public interface SlotAllocator
| Modifier and Type | Method and Description |
|---|---|
ResourceCounter |
calculateRequiredSlots(Iterable<JobInformation.VertexInformation> vertices)
Calculates the total resources required for scheduling the given vertices.
|
Optional<VertexParallelism> |
determineParallelism(JobInformation jobInformation,
Collection<? extends SlotInfo> slots)
Determines the parallelism at which the vertices could be scheduled given the collection of
slots.
|
Optional<JobSchedulingPlan> |
determineParallelismAndCalculateAssignment(JobInformation jobInformation,
Collection<? extends SlotInfo> slots,
JobAllocationsInformation jobAllocationsInformation)
Same as
determineParallelism(JobInformation, Collection) but additionally determine
assignment of slots to execution slot sharing groups. |
Optional<ReservedSlots> |
tryReserveResources(JobSchedulingPlan jobSchedulingPlan)
Reserves slots according to the given assignment if possible.
|
ResourceCounter calculateRequiredSlots(Iterable<JobInformation.VertexInformation> vertices)
vertices - vertices to scheduleOptional<VertexParallelism> determineParallelism(JobInformation jobInformation, Collection<? extends SlotInfo> slots)
calculateRequiredSlots(Iterable) returned.
If a VertexParallelism is returned then it covers all vertices contained in the
given job information.
Implementations of this method must be side-effect free. There is no guarantee that the
result of this method is ever passed to tryReserveResources(JobSchedulingPlan).
jobInformation - information about the job graphslots - slots to consider for determining the parallelismOptional<JobSchedulingPlan> determineParallelismAndCalculateAssignment(JobInformation jobInformation, Collection<? extends SlotInfo> slots, JobAllocationsInformation jobAllocationsInformation)
determineParallelism(JobInformation, Collection) but additionally determine
assignment of slots to execution slot sharing groups.Optional<ReservedSlots> tryReserveResources(JobSchedulingPlan jobSchedulingPlan)
Optional.empty().jobSchedulingPlan - information on how slots should be assigned to the slotsOptional.empty()Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.