Class StagePartitioner
- java.lang.Object
-
- org.apache.nemo.runtime.common.plan.StagePartitioner
-
- All Implemented Interfaces:
java.util.function.Function<IRDAG,java.util.Map<IRVertex,java.lang.Integer>>
@ThreadSafe public final class StagePartitioner extends java.lang.Object implements java.util.function.Function<IRDAG,java.util.Map<IRVertex,java.lang.Integer>>
A function that is responsible for stage partitioning on IR DAG. Each stage becomes maximal set ofIRVertex
such that- branches and non-OneToOne edges are not allowed within a stage, and
- all vertices in a stage should have same
VertexExecutionProperty
map, except for the ignored properties.
-
-
Constructor Summary
Constructors Constructor Description StagePartitioner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIgnoredPropertyKey(java.lang.Class<? extends VertexExecutionProperty> ignoredPropertyKey)
By default, the stage partitioner merges two vertices into one stage if and only if the two vertices have same set ofVertexExecutionProperty
.java.util.Map<IRVertex,java.lang.Integer>
apply(IRDAG irDAG)
java.util.Set<VertexExecutionProperty>
getStageProperties(IRVertex vertex)
-
-
-
Method Detail
-
addIgnoredPropertyKey
public void addIgnoredPropertyKey(java.lang.Class<? extends VertexExecutionProperty> ignoredPropertyKey)
By default, the stage partitioner merges two vertices into one stage if and only if the two vertices have same set ofVertexExecutionProperty
. Invoking this method will make the stage partitioner ignore a specific property during comparing the execution property maps.- Parameters:
ignoredPropertyKey
- a property that will be ignored during the stage partitioning.
-
getStageProperties
public java.util.Set<VertexExecutionProperty> getStageProperties(IRVertex vertex)
- Parameters:
vertex
- a vertex in a stage- Returns:
- set of stage-level properties for the stage
-
-