Class BinPackingNodeAllocatorService
java.lang.Object
io.trino.execution.scheduler.faulttolerant.BinPackingNodeAllocatorService
- All Implemented Interfaces:
NodeAllocator,NodeAllocatorService,Closeable,AutoCloseable
@ThreadSafe
public class BinPackingNodeAllocatorService
extends Object
implements NodeAllocatorService, NodeAllocator
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.trino.execution.scheduler.faulttolerant.NodeAllocator
NodeAllocator.NodeLease -
Constructor Summary
ConstructorsConstructorDescriptionBinPackingNodeAllocatorService(InternalNodeManager nodeManager, ClusterMemoryManager clusterMemoryManager, NodeSchedulerConfig nodeSchedulerConfig, MemoryManagerConfig memoryManagerConfig) -
Method Summary
Modifier and TypeMethodDescriptionacquire(NodeRequirements nodeRequirements, io.airlift.units.DataSize memoryRequirement, TaskExecutionClass executionClass) Requests acquisition of node.voidclose()getNodeAllocator(Session session) voidstart()voidstop()
-
Constructor Details
-
BinPackingNodeAllocatorService
@Inject public BinPackingNodeAllocatorService(InternalNodeManager nodeManager, ClusterMemoryManager clusterMemoryManager, NodeSchedulerConfig nodeSchedulerConfig, MemoryManagerConfig memoryManagerConfig)
-
-
Method Details
-
start
@PostConstruct public void start() -
stop
@PreDestroy public void stop() -
getNodeAllocator
- Specified by:
getNodeAllocatorin interfaceNodeAllocatorService
-
acquire
public NodeAllocator.NodeLease acquire(NodeRequirements nodeRequirements, io.airlift.units.DataSize memoryRequirement, TaskExecutionClass executionClass) Description copied from interface:NodeAllocatorRequests acquisition of node. Obtained node can be obtained viaNodeAllocator.NodeLease.getNode()method. The node may not be available immediately. Calling party needs to wait until future returned is done. It is obligatory for the calling party to release all the leases they obtained viaNodeAllocator.NodeLease.release().- Specified by:
acquirein interfaceNodeAllocator
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceNodeAllocator
-