public class DefaultExecutionSlotAllocator extends Object implements ExecutionSlotAllocator
ExecutionSlotAllocator
which will use SlotProvider
to allocate slots and
keep the unfulfilled requests for further cancellation.Constructor and Description |
---|
DefaultExecutionSlotAllocator(SlotProvider slotProvider,
InputsLocationsRetriever inputsLocationsRetriever,
Time allocationTimeout) |
Modifier and Type | Method and Description |
---|---|
Collection<SlotExecutionVertexAssignment> |
allocateSlotsFor(Collection<ExecutionVertexSchedulingRequirements> executionVertexSchedulingRequirements)
Allocate slots for the given executions.
|
void |
cancel(ExecutionVertexID executionVertexId)
Cancel an ongoing slot request.
|
CompletableFuture<Void> |
stop()
Stop the allocator.
|
public DefaultExecutionSlotAllocator(SlotProvider slotProvider, InputsLocationsRetriever inputsLocationsRetriever, Time allocationTimeout)
public Collection<SlotExecutionVertexAssignment> allocateSlotsFor(Collection<ExecutionVertexSchedulingRequirements> executionVertexSchedulingRequirements)
ExecutionSlotAllocator
allocateSlotsFor
in interface ExecutionSlotAllocator
executionVertexSchedulingRequirements
- The requirements for scheduling the executions.public void cancel(ExecutionVertexID executionVertexId)
ExecutionSlotAllocator
cancel
in interface ExecutionSlotAllocator
executionVertexId
- identifying which slot request should be canceled.public CompletableFuture<Void> stop()
ExecutionSlotAllocator
stop
in interface ExecutionSlotAllocator
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.