Package io.trino.execution
Class ClusterSizeMonitor
java.lang.Object
io.trino.execution.ClusterSizeMonitor
-
Constructor Summary
ConstructorsConstructorDescriptionClusterSizeMonitor(InternalNodeManager nodeManager, boolean includeCoordinator) ClusterSizeMonitor(InternalNodeManager nodeManager, NodeSchedulerConfig nodeSchedulerConfig) -
Method Summary
Modifier and TypeMethodDescriptionintvoidstart()voidstop()com.google.common.util.concurrent.ListenableFuture<Void> waitForMinimumWorkers(int executionMinCount, io.airlift.units.Duration executionMaxWait) Returns a listener that completes when the minimum number of workers for the cluster has been met.
-
Constructor Details
-
ClusterSizeMonitor
@Inject public ClusterSizeMonitor(InternalNodeManager nodeManager, NodeSchedulerConfig nodeSchedulerConfig) -
ClusterSizeMonitor
-
-
Method Details
-
start
@PostConstruct public void start() -
stop
@PreDestroy public void stop() -
waitForMinimumWorkers
public com.google.common.util.concurrent.ListenableFuture<Void> waitForMinimumWorkers(int executionMinCount, io.airlift.units.Duration executionMaxWait) Returns a listener that completes when the minimum number of workers for the cluster has been met. Note: caller should not add a listener using the direct executor, as this can delay the notifications for other listeners. -
getRequiredWorkers
public int getRequiredWorkers()
-