Package io.trino.execution
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 Summary
ConstructorsConstructorDescriptionTaskInfo(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 aTaskInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic TaskInfocreateInitialTask(TaskId taskId, URI location, String nodeId, boolean speculative, Optional<List<PipelinedBufferInfo>> pipelinedBufferStates, TaskStats taskStats) final booleanIndicates whether some other object is "equal to" this one.Optional<io.airlift.units.DataSize> Returns the value of theestimatedMemoryrecord component.final inthashCode()Returns a hash code value for this object.org.joda.time.DateTimeReturns the value of thelastHeartbeatrecord component.booleanReturns the value of theneedsPlanrecord component.Returns the value of thenoMoreSplitsrecord component.Returns the value of theoutputBuffersrecord component.stats()Returns the value of thestatsrecord component.Returns the value of thetaskStatusrecord component.toString()Returns a string representation of this record class.withEstimatedMemory(io.airlift.units.DataSize estimatedMemory) withTaskStatus(TaskStatus newTaskStatus)
-
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 aTaskInforecord class.- Parameters:
taskStatus- the value for thetaskStatusrecord componentlastHeartbeat- the value for thelastHeartbeatrecord componentoutputBuffers- the value for theoutputBuffersrecord componentnoMoreSplits- the value for thenoMoreSplitsrecord componentstats- the value for thestatsrecord componentestimatedMemory- the value for theestimatedMemoryrecord componentneedsPlan- the value for theneedsPlanrecord component
-
-
Method Details
-
summarize
-
pruneSpoolingOutputStats
-
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. -
createInitialTask
-
withTaskStatus
-
withEstimatedMemory
-
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
taskStatus
Returns the value of thetaskStatusrecord component.- Returns:
- the value of the
taskStatusrecord component
-
lastHeartbeat
public org.joda.time.DateTime lastHeartbeat()Returns the value of thelastHeartbeatrecord component.- Returns:
- the value of the
lastHeartbeatrecord component
-
outputBuffers
Returns the value of theoutputBuffersrecord component.- Returns:
- the value of the
outputBuffersrecord component
-
noMoreSplits
Returns the value of thenoMoreSplitsrecord component.- Returns:
- the value of the
noMoreSplitsrecord component
-
stats
Returns the value of thestatsrecord component.- Returns:
- the value of the
statsrecord component
-
estimatedMemory
Returns the value of theestimatedMemoryrecord component.- Returns:
- the value of the
estimatedMemoryrecord component
-
needsPlan
public boolean needsPlan()Returns the value of theneedsPlanrecord component.- Returns:
- the value of the
needsPlanrecord component
-