public interface SlotAllocator
|Modifier and Type||Method and Description|
Calculates the total resources required for scheduling the given vertices.
Determines the parallelism at which the vertices could be scheduled given the collection of slots.
Reserves slots according to the given assignment if possible.
ResourceCounter calculateRequiredSlots(Iterable<JobInformation.VertexInformation> vertices)
vertices- vertices to schedule
Optional<? extends VertexParallelism> determineParallelism(JobInformation jobInformation, Collection<? extends SlotInfo> slots)
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
jobInformation- information about the job graph
slots- slots to consider for determining the parallelism
Optional<ReservedSlots> tryReserveResources(VertexParallelism vertexParallelism)
vertexParallelism- information on how slots should be assigned to the slots
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.