Class NemoPlanRewriter

  • All Implemented Interfaces:

    public final class NemoPlanRewriter
    extends Object
    implements PlanRewriter
    Rewrites the physical plan during execution, to enforce the optimizations of Nemo RunTimePasses.

    A high-level flow of a rewrite is as follows: Runtime - (PhysicalPlan-level info) - NemoPlanRewriter - (IRDAG-level info) - NemoOptimizer - (new IRDAG) - NemoPlanRewriter - (new PhysicalPlan) - Runtime

    Here, the NemoPlanRewriter acts as a translator between the Runtime that only understands PhysicalPlan-level info, and the NemoOptimizer that only understands IRDAG-level info.

    This decoupling between the NemoOptimizer and the Runtime lets Nemo optimization policies dynamically control distributed execution behaviors, and at the same time enjoy correctness/reusability/composability properties that the IRDAG abstraction provides.

    • Method Detail

      • setIRDAG

        public void setIRDAG​(IRDAG irdag)
      • rewrite

        public PhysicalPlan rewrite​(PhysicalPlan currentPhysicalPlan,
                                    int messageId)
        Specified by:
        rewrite in interface PlanRewriter
        currentPhysicalPlan - to rewrite.
        messageId - of the rewrite.
        physical plan.
      • accumulate

        public void accumulate​(int messageId,
                               Object data)
        Specified by:
        accumulate in interface PlanRewriter
        messageId - of the rewrite.
        data - to accumulate.