Package io.trino.execution
Class ClusterSizeMonitor
- java.lang.Object
-
- io.trino.execution.ClusterSizeMonitor
-
public class ClusterSizeMonitor extends Object
-
-
Constructor Summary
Constructors Constructor Description ClusterSizeMonitor(InternalNodeManager nodeManager, boolean includeCoordinator)ClusterSizeMonitor(InternalNodeManager nodeManager, NodeSchedulerConfig nodeSchedulerConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetRequiredWorkers()voidstart()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 Detail
-
ClusterSizeMonitor
@Inject public ClusterSizeMonitor(InternalNodeManager nodeManager, NodeSchedulerConfig nodeSchedulerConfig)
-
ClusterSizeMonitor
public ClusterSizeMonitor(InternalNodeManager nodeManager, boolean includeCoordinator)
-
-
Method Detail
-
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()
-
-