Package io.trino.server.remotetask
Class TaskInfoFetcher
java.lang.Object
io.trino.server.remotetask.TaskInfoFetcher
-
Constructor Summary
ConstructorsConstructorDescriptionTaskInfoFetcher(Consumer<Throwable> onFail, io.trino.server.remotetask.ContinuousTaskStatusFetcher taskStatusFetcher, TaskInfo initialTask, io.airlift.http.client.HttpClient httpClient, Supplier<io.opentelemetry.api.trace.SpanBuilder> spanBuilderFactory, io.airlift.units.Duration updateInterval, io.airlift.json.JsonCodec<TaskInfo> taskInfoCodec, io.airlift.units.Duration maxErrorDuration, boolean summarizeTaskInfo, Executor executor, ScheduledExecutorService updateScheduledExecutor, ScheduledExecutorService errorScheduledExecutor, RemoteTaskStats stats, Optional<io.airlift.units.DataSize> estimatedMemory, RetryPolicy retryPolicy) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFinalTaskInfoListener(StateMachine.StateChangeListener<TaskInfo> stateChangeListener) Add a listener for the final task info.voidstart()
-
Constructor Details
-
TaskInfoFetcher
public TaskInfoFetcher(Consumer<Throwable> onFail, io.trino.server.remotetask.ContinuousTaskStatusFetcher taskStatusFetcher, TaskInfo initialTask, io.airlift.http.client.HttpClient httpClient, Supplier<io.opentelemetry.api.trace.SpanBuilder> spanBuilderFactory, io.airlift.units.Duration updateInterval, io.airlift.json.JsonCodec<TaskInfo> taskInfoCodec, io.airlift.units.Duration maxErrorDuration, boolean summarizeTaskInfo, Executor executor, ScheduledExecutorService updateScheduledExecutor, ScheduledExecutorService errorScheduledExecutor, RemoteTaskStats stats, Optional<io.airlift.units.DataSize> estimatedMemory, RetryPolicy retryPolicy)
-
-
Method Details
-
getTaskInfo
-
start
public void start() -
addFinalTaskInfoListener
public void addFinalTaskInfoListener(StateMachine.StateChangeListener<TaskInfo> stateChangeListener) Add a listener for the final task info. This notification is guaranteed to be fired only once. Listener is always notified asynchronously using a dedicated notification thread pool so, care should be taken to avoid leakingthiswhen adding a listener in a constructor. Additionally, it is possible notifications are observed out of order due to the asynchronous execution. -
retrieveAndDropSpoolingOutputStats
-