public interface SlotProvider
It supports two allocating modes:
CompletableFuture.getNow(Object)
to get the allocated slot.Modifier and Type | Method and Description |
---|---|
CompletableFuture<SimpleSlot> |
allocateSlot(ScheduledUnit task,
boolean allowQueued,
Collection<TaskManagerLocation> preferredLocations)
Allocating slot with specific requirement.
|
CompletableFuture<SimpleSlot> allocateSlot(ScheduledUnit task, boolean allowQueued, Collection<TaskManagerLocation> preferredLocations)
task
- The task to allocate the slot forallowQueued
- Whether allow the task be queued if we do not have enough resourcepreferredLocations
- preferred locations for the slot allocationCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.