Record Class TaskInfo

java.lang.Object
java.lang.Record
io.trino.execution.TaskInfo

public record TaskInfo(TaskStatus taskStatus, org.joda.time.DateTime lastHeartbeat, OutputBufferInfo outputBuffers, Set<PlanNodeId> noMoreSplits, TaskStats stats, Optional<io.airlift.units.DataSize> estimatedMemory, boolean needsPlan) extends Record
  • Constructor Details

    • TaskInfo

      public TaskInfo(TaskStatus taskStatus, org.joda.time.DateTime lastHeartbeat, OutputBufferInfo outputBuffers, Set<PlanNodeId> noMoreSplits, TaskStats stats, Optional<io.airlift.units.DataSize> estimatedMemory, boolean needsPlan)
      Creates an instance of a TaskInfo record class.
      Parameters:
      taskStatus - the value for the taskStatus record component
      lastHeartbeat - the value for the lastHeartbeat record component
      outputBuffers - the value for the outputBuffers record component
      noMoreSplits - the value for the noMoreSplits record component
      stats - the value for the stats record component
      estimatedMemory - the value for the estimatedMemory record component
      needsPlan - the value for the needsPlan record component
  • Method Details

    • summarize

      public TaskInfo summarize()
    • pruneSpoolingOutputStats

      public TaskInfo pruneSpoolingOutputStats()
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • createInitialTask

      public static TaskInfo createInitialTask(TaskId taskId, URI location, String nodeId, boolean speculative, Optional<List<PipelinedBufferInfo>> pipelinedBufferStates, TaskStats taskStats)
    • withTaskStatus

      public TaskInfo withTaskStatus(TaskStatus newTaskStatus)
    • withEstimatedMemory

      public TaskInfo withEstimatedMemory(io.airlift.units.DataSize estimatedMemory)
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • taskStatus

      public TaskStatus taskStatus()
      Returns the value of the taskStatus record component.
      Returns:
      the value of the taskStatus record component
    • lastHeartbeat

      public org.joda.time.DateTime lastHeartbeat()
      Returns the value of the lastHeartbeat record component.
      Returns:
      the value of the lastHeartbeat record component
    • outputBuffers

      public OutputBufferInfo outputBuffers()
      Returns the value of the outputBuffers record component.
      Returns:
      the value of the outputBuffers record component
    • noMoreSplits

      public Set<PlanNodeId> noMoreSplits()
      Returns the value of the noMoreSplits record component.
      Returns:
      the value of the noMoreSplits record component
    • stats

      public TaskStats stats()
      Returns the value of the stats record component.
      Returns:
      the value of the stats record component
    • estimatedMemory

      public Optional<io.airlift.units.DataSize> estimatedMemory()
      Returns the value of the estimatedMemory record component.
      Returns:
      the value of the estimatedMemory record component
    • needsPlan

      public boolean needsPlan()
      Returns the value of the needsPlan record component.
      Returns:
      the value of the needsPlan record component