public interface SlotAllocator
| 限定符和类型 | 方法和说明 |
|---|---|
ResourceCounter |
calculateRequiredSlots(Iterable<JobInformation.VertexInformation> vertices)
Calculates the total resources required for scheduling the given vertices.
|
Optional<? extends VertexParallelism> |
determineParallelism(JobInformation jobInformation,
Collection<? extends SlotInfo> slots)
Determines the parallelism at which the vertices could be scheduled given the collection of
slots.
|
Optional<ReservedSlots> |
tryReserveResources(VertexParallelism vertexParallelism)
Reserves slots according to the given assignment if possible.
|
ResourceCounter calculateRequiredSlots(Iterable<JobInformation.VertexInformation> vertices)
vertices - vertices to scheduleOptional<? extends 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(VertexParallelism).
jobInformation - information about the job graphslots - slots to consider for determining the parallelismOptional<ReservedSlots> tryReserveResources(VertexParallelism vertexParallelism)
Optional.empty().vertexParallelism - information on how slots should be assigned to the slotsOptional.empty()Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.