Class Task

  • All Implemented Interfaces:
    java.io.Serializable

    public final class Task
    extends java.lang.Object
    implements java.io.Serializable
    A Task (attempt) is a self-contained executable that can be executed on a machine.
    See Also:
    Serialized Form
    • Constructor Detail

      • Task

        public Task​(java.lang.String planId,
                    java.lang.String taskId,
                    ExecutionPropertyMap<VertexExecutionProperty> executionProperties,
                    byte[] serializedIRDag,
                    java.util.List<StageEdge> taskIncomingEdges,
                    java.util.List<StageEdge> taskOutgoingEdges,
                    java.util.Map<java.lang.String,​Readable> irVertexIdToReadable)
        Constructor.
        Parameters:
        planId - the id of the physical plan.
        taskId - the ID of this task attempt.
        executionProperties - VertexExecutionProperty map for the corresponding stage
        serializedIRDag - the serialized DAG of the task.
        taskIncomingEdges - the incoming edges of the task.
        taskOutgoingEdges - the outgoing edges of the task.
        irVertexIdToReadable - the map between IRVertex id to readable.
    • Method Detail

      • getPlanId

        public java.lang.String getPlanId()
        Returns:
        the id of the plan.
      • getSerializedIRDag

        public byte[] getSerializedIRDag()
        Returns:
        the serialized IR DAG of the task.
      • getTaskId

        public java.lang.String getTaskId()
        Returns:
        the ID of the task.
      • getStageId

        public java.lang.String getStageId()
        Returns:
        the Stage ID of the task.
      • getTaskIncomingEdges

        public java.util.List<StageEdge> getTaskIncomingEdges()
        Returns:
        the incoming edges of the task.
      • getTaskOutgoingEdges

        public java.util.List<StageEdge> getTaskOutgoingEdges()
        Returns:
        the outgoing edges of the task.
      • getAttemptIdx

        public int getAttemptIdx()
        Returns:
        the attempt index.
      • getPropertyValue

        public <T extends java.io.Serializable> java.util.Optional<T> getPropertyValue​(java.lang.Class<? extends VertexExecutionProperty<T>> executionPropertyKey)
        Get the executionProperty of this task.
        Type Parameters:
        T - Type of the return value.
        Parameters:
        executionPropertyKey - key of the execution property.
        Returns:
        the execution property.
      • getIrVertexIdToReadable

        public java.util.Map<java.lang.String,​Readable> getIrVertexIdToReadable()
        Returns:
        the map between IRVertex id and readable.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object