public interface SlotPoolGateway extends RpcGateway
SlotPool
.Modifier and Type | Method and Description |
---|---|
CompletableFuture<SimpleSlot> |
allocateSlot(ScheduledUnit task,
ResourceProfile resources,
Iterable<TaskManagerLocation> locationPreferences,
Time timeout) |
void |
connectToResourceManager(ResourceManagerGateway resourceManagerGateway)
Connects the SlotPool to the given ResourceManager.
|
void |
disconnectResourceManager()
Disconnects the slot pool from its current Resource Manager.
|
void |
failAllocation(AllocationID allocationID,
Exception cause) |
CompletableFuture<Boolean> |
offerSlot(AllocatedSlot slot) |
CompletableFuture<Collection<SlotOffer>> |
offerSlots(Collection<Tuple2<AllocatedSlot,SlotOffer>> offers) |
void |
registerTaskManager(ResourceID resourceID) |
CompletableFuture<Acknowledge> |
releaseTaskManager(ResourceID resourceID) |
void |
returnAllocatedSlot(Slot slot) |
void |
suspend() |
getAddress, getHostname
void suspend()
void connectToResourceManager(ResourceManagerGateway resourceManagerGateway)
resourceManagerGateway
- The RPC gateway for the resource manager.void disconnectResourceManager()
The slot pool will still be able to serve slots from its internal pool.
void registerTaskManager(ResourceID resourceID)
CompletableFuture<Acknowledge> releaseTaskManager(ResourceID resourceID)
CompletableFuture<Boolean> offerSlot(AllocatedSlot slot)
CompletableFuture<Collection<SlotOffer>> offerSlots(Collection<Tuple2<AllocatedSlot,SlotOffer>> offers)
void failAllocation(AllocationID allocationID, Exception cause)
CompletableFuture<SimpleSlot> allocateSlot(ScheduledUnit task, ResourceProfile resources, Iterable<TaskManagerLocation> locationPreferences, Time timeout)
void returnAllocatedSlot(Slot slot)
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.