Package org.apache.flink.compiler.plan

Examples of org.apache.flink.compiler.plan.OptimizedPlan


   
    Plan plan = new Plan(output);
    plan.setDefaultParallelism(DOP);

    PactCompiler pc = new PactCompiler(new DataStatistics());
    OptimizedPlan op = pc.compile(plan);

    NepheleJobGraphGenerator jgg = new NepheleJobGraphGenerator();
    return jgg.compileJobGraph(op);
  }
View Full Code Here


    }
  }

  private JobGraph getJobGraph(final Plan plan) throws Exception {
    final PactCompiler pc = new PactCompiler(new DataStatistics());
    final OptimizedPlan op = pc.compile(plan);
    final NepheleJobGraphGenerator jgg = new NepheleJobGraphGenerator();
    return jgg.compileJobGraph(op);
  }
View Full Code Here

    testReducer.setInput(input);

    Plan plan = new Plan(output);

    PactCompiler pc = new PactCompiler(new DataStatistics());
    OptimizedPlan op = pc.compile(plan);

    NepheleJobGraphGenerator jgg = new NepheleJobGraphGenerator();
    return jgg.compileJobGraph(op);

  }
View Full Code Here

      DataSet<String> source2 = env.fromElements("test");
     
      source1.map(new IdentityMapper<String>()).withBroadcastSet(source2, "some name").print();
     
      Plan p = env.createProgramPlan();
      OptimizedPlan op = compileNoStats(p);
     
      SinkPlanNode sink = op.getDataSinks().iterator().next();
      SingleInputPlanNode mapper = (SingleInputPlanNode) sink.getInput().getSource();
     
      assertEquals(TempMode.NONE, mapper.getInput().getTempMode());
    }
    catch (Exception e) {
View Full Code Here

        DataSet<String> source1 = env.fromElements("test");
       
        source1.map(new IdentityMapper<String>()).map(new IdentityMapper<String>()).withBroadcastSet(source1, "some name").print();
       
        Plan p = env.createProgramPlan();
        OptimizedPlan op = compileNoStats(p);
       
        SinkPlanNode sink = op.getDataSinks().iterator().next();
        SingleInputPlanNode mapper = (SingleInputPlanNode) sink.getInput().getSource();
       
        assertEquals(TempMode.PIPELINE_BREAKER, mapper.getInput().getTempMode());
      }
      catch (Exception e) {
View Full Code Here

                      .withBroadcastSet(source, "bc");
     
      result.print();
     
      Plan p = env.createProgramPlan();
      OptimizedPlan op = compileNoStats(p);
     
      SinkPlanNode sink = op.getDataSinks().iterator().next();
      SingleInputPlanNode mapper = (SingleInputPlanNode) sink.getInput().getSource();
     
      assertTrue(mapper.getInput().getTempMode().breaksPipeline());
    }
    catch (Exception e) {
View Full Code Here

              .withBroadcastSet(bcInput2, "bc2");
     
      result.print();
     
      Plan p = env.createProgramPlan();
      OptimizedPlan op = compileNoStats(p);
     
      SinkPlanNode sink = op.getDataSinks().iterator().next();
      SingleInputPlanNode mapper = (SingleInputPlanNode) sink.getInput().getSource();
     
      assertTrue(mapper.getInput().getTempMode().breaksPipeline());
    }
    catch (Exception e) {
View Full Code Here

             
     
      iteration.closeWith(result).print();
     
      Plan p = env.createProgramPlan();
      OptimizedPlan op = compileNoStats(p);
     
      SinkPlanNode sink = op.getDataSinks().iterator().next();
      BulkIterationPlanNode iterationPlanNode = (BulkIterationPlanNode) sink.getInput().getSource();
      SingleInputPlanNode mapper = (SingleInputPlanNode) iterationPlanNode.getRootOfStepFunction();
     
      assertTrue(mapper.getInput().getTempMode().breaksPipeline());
    }
View Full Code Here

          .cross(initialSource).withParameters(conf)
          .print();
       
       
        Plan p = env.createProgramPlan();
        OptimizedPlan op = compileNoStats(p);
        SinkPlanNode sink = op.getDataSinks().iterator().next();
        DualInputPlanNode mapper = (DualInputPlanNode) sink.getInput().getSource();
       
        assertTrue(mapper.getInput1().getTempMode().breaksPipeline());
      }
     
      {
        ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
        env.setDegreeOfParallelism(64);
       
        DataSet<Long> initialSource = env.generateSequence(1, 10);
       
        Configuration conf= new Configuration();
        conf.setString(PactCompiler.HINT_LOCAL_STRATEGY, PactCompiler.HINT_LOCAL_STRATEGY_NESTEDLOOP_BLOCKED_OUTER_SECOND);
        initialSource
          .map(new IdentityMapper<Long>())
          .cross(initialSource).withParameters(conf)
          .print();
       
       
        Plan p = env.createProgramPlan();
        OptimizedPlan op = compileNoStats(p);
       
        SinkPlanNode sink = op.getDataSinks().iterator().next();
        DualInputPlanNode mapper = (DualInputPlanNode) sink.getInput().getSource();
       
        assertTrue(mapper.getInput2().getTempMode().breaksPipeline());
      }
     
      {
        ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
        env.setDegreeOfParallelism(64);
       
        DataSet<Long> initialSource = env.generateSequence(1, 10);
       
        Configuration conf= new Configuration();
        conf.setString(PactCompiler.HINT_LOCAL_STRATEGY, PactCompiler.HINT_LOCAL_STRATEGY_NESTEDLOOP_STREAMED_OUTER_FIRST);
        initialSource
          .map(new IdentityMapper<Long>())
          .cross(initialSource).withParameters(conf)
          .print();
       
       
        Plan p = env.createProgramPlan();
        OptimizedPlan op = compileNoStats(p);
       
        SinkPlanNode sink = op.getDataSinks().iterator().next();
        DualInputPlanNode mapper = (DualInputPlanNode) sink.getInput().getSource();
       
        assertTrue(mapper.getInput1().getTempMode().breaksPipeline());
      }
     
      {
        ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
        env.setDegreeOfParallelism(64);
       
        DataSet<Long> initialSource = env.generateSequence(1, 10);
       
        Configuration conf= new Configuration();
        conf.setString(PactCompiler.HINT_LOCAL_STRATEGY, PactCompiler.HINT_LOCAL_STRATEGY_NESTEDLOOP_STREAMED_OUTER_SECOND);
        initialSource
          .map(new IdentityMapper<Long>())
          .cross(initialSource).withParameters(conf)
          .print();
       
       
        Plan p = env.createProgramPlan();
        OptimizedPlan op = compileNoStats(p);
       
        SinkPlanNode sink = op.getDataSinks().iterator().next();
        DualInputPlanNode mapper = (DualInputPlanNode) sink.getInput().getSource();
       
        assertTrue(mapper.getInput2().getTempMode().breaksPipeline());
      }
    }
View Full Code Here

  @Test
  public void testRecordApiWithDeferredSoltionSetUpdateWithMapper() {
    Plan plan = getRecordTestPlan(false, true);
   
    OptimizedPlan oPlan;
    try {
      oPlan = compileNoStats(plan);
    } catch(CompilerException ce) {
      ce.printStackTrace();
      fail("The pact compiler is unable to compile this plan correctly.");
View Full Code Here

TOP

Related Classes of org.apache.flink.compiler.plan.OptimizedPlan

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.