Class Task
- java.lang.Object
-
- org.apache.nemo.runtime.common.plan.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 Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAttemptIdx()
ExecutionPropertyMap<VertexExecutionProperty>
getExecutionProperties()
java.util.Map<java.lang.String,Readable>
getIrVertexIdToReadable()
java.lang.String
getPlanId()
<T extends java.io.Serializable>
java.util.Optional<T>getPropertyValue(java.lang.Class<? extends VertexExecutionProperty<T>> executionPropertyKey)
Get the executionProperty of this task.byte[]
getSerializedIRDag()
java.lang.String
getStageId()
java.lang.String
getTaskId()
java.util.List<StageEdge>
getTaskIncomingEdges()
java.util.List<StageEdge>
getTaskOutgoingEdges()
java.lang.String
toString()
-
-
-
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 stageserializedIRDag
- 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.
-
getExecutionProperties
public ExecutionPropertyMap<VertexExecutionProperty> getExecutionProperties()
- Returns:
VertexExecutionProperty
map for the corresponding stage
-
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 classjava.lang.Object
-
-