Class Stage
- java.lang.Object
-
- org.apache.nemo.common.dag.Vertex
-
- org.apache.nemo.runtime.common.plan.Stage
-
- All Implemented Interfaces:
java.io.Serializable
public final class Stage extends Vertex
Stage.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Stage(java.lang.String stageId, java.util.List<java.lang.Integer> taskIndices, DAG<IRVertex,RuntimeEdge<IRVertex>> irDag, ExecutionPropertyMap<VertexExecutionProperty> executionProperties, java.util.List<java.util.Map<java.lang.String,Readable>> vertexIdToReadables)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getEnableDynamicTaskSizing()
ExecutionPropertyMap<VertexExecutionProperty>
getExecutionProperties()
DAG<IRVertex,RuntimeEdge<IRVertex>>
getIRDAG()
int
getParallelism()
int
getPartitionerProperty()
com.fasterxml.jackson.databind.node.ObjectNode
getPropertiesAsJsonNode()
<T extends java.io.Serializable>
java.util.Optional<T>getPropertyValue(java.lang.Class<? extends VertexExecutionProperty<T>> executionPropertyKey)
Get the executionProperty of the IREdge.int
getScheduleGroup()
byte[]
getSerializedIRDAG()
java.util.List<java.lang.Integer>
getTaskIndices()
java.util.List<java.util.Map<java.lang.String,Readable>>
getVertexIdToReadables()
void
setExecutionProperties(ExecutionPropertyMap<VertexExecutionProperty> executionProperties)
-
Methods inherited from class org.apache.nemo.common.dag.Vertex
getId, getNumericId
-
-
-
-
Constructor Detail
-
Stage
public Stage(java.lang.String stageId, java.util.List<java.lang.Integer> taskIndices, DAG<IRVertex,RuntimeEdge<IRVertex>> irDag, ExecutionPropertyMap<VertexExecutionProperty> executionProperties, java.util.List<java.util.Map<java.lang.String,Readable>> vertexIdToReadables)
Constructor.- Parameters:
stageId
- ID of the stage.taskIndices
- indices of the tasks to execute.irDag
- the DAG of the task in this stage.executionProperties
- set ofVertexExecutionProperty
for this stagevertexIdToReadables
- the list of maps between vertex ID andReadable
.
-
-
Method Detail
-
getIRDAG
public DAG<IRVertex,RuntimeEdge<IRVertex>> getIRDAG()
- Returns:
- the IRVertex DAG.
-
getSerializedIRDAG
public byte[] getSerializedIRDAG()
- Returns:
- the serialized DAG of the task.
-
getTaskIndices
public java.util.List<java.lang.Integer> getTaskIndices()
- Returns:
- task indices of this stage to execute. For non-sampling vertices, returns [0, 1, 2, ..., parallelism-1]. For sampling vertices, returns a list of size (parallelism * samplingRate).
-
getParallelism
public int getParallelism()
- Returns:
- the parallelism.
-
getEnableDynamicTaskSizing
public boolean getEnableDynamicTaskSizing()
- Returns:
- the enable property of dynamic task sizing. If not exists, return false.
-
getPartitionerProperty
public int getPartitionerProperty()
- Returns:
- the number of partitions.
-
getScheduleGroup
public int getScheduleGroup()
- Returns:
- the schedule group.
-
getExecutionProperties
public ExecutionPropertyMap<VertexExecutionProperty> getExecutionProperties()
- Returns:
VertexExecutionProperty
map for this stage
-
setExecutionProperties
public void setExecutionProperties(ExecutionPropertyMap<VertexExecutionProperty> executionProperties)
- Parameters:
executionProperties
- to set.
-
getPropertyValue
public <T extends java.io.Serializable> java.util.Optional<T> getPropertyValue(java.lang.Class<? extends VertexExecutionProperty<T>> executionPropertyKey)
Get the executionProperty of the IREdge.- Type Parameters:
T
- Type of the return value.- Parameters:
executionPropertyKey
- key of the execution property.- Returns:
- the execution property.
-
getVertexIdToReadables
public java.util.List<java.util.Map<java.lang.String,Readable>> getVertexIdToReadables()
- Returns:
- the list of maps between vertex ID and readables.
-
getPropertiesAsJsonNode
public com.fasterxml.jackson.databind.node.ObjectNode getPropertiesAsJsonNode()
- Overrides:
getPropertiesAsJsonNode
in classVertex
- Returns:
- JSON representation of additional properties
-
-