Class TaskInfoFetcher

java.lang.Object
io.trino.server.remotetask.TaskInfoFetcher

public class TaskInfoFetcher extends Object
  • 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

      public TaskInfo 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 leaking this when adding a listener in a constructor. Additionally, it is possible notifications are observed out of order due to the asynchronous execution.
    • retrieveAndDropSpoolingOutputStats

      public SpoolingOutputStats.Snapshot retrieveAndDropSpoolingOutputStats()