Class StagePartitioner

  • All Implemented Interfaces:

    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 of IRVertex 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 Detail

      • StagePartitioner

        public StagePartitioner()
    • 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 of VertexExecutionProperty. Invoking this method will make the stage partitioner ignore a specific property during comparing the execution property maps.
        ignoredPropertyKey - a property that will be ignored during the stage partitioning.
      • apply

        public java.util.Map<IRVertex,​java.lang.Integer> apply​(IRDAG irDAG)
        Specified by:
        apply in interface java.util.function.Function<IRDAG,​java.util.Map<IRVertex,​java.lang.Integer>>
        irDAG - IR DAG to perform stage partition on.
        a map between IR vertex and the corresponding stage id
      • getStageProperties

        public java.util.Set<VertexExecutionProperty> getStageProperties​(IRVertex vertex)
        vertex - a vertex in a stage
        set of stage-level properties for the stage