Package org.apache.flink.api.common

Examples of org.apache.flink.api.common.Plan


    sink.setDegreeOfParallelism(numSubTasks);
    sink.setGlobalOrder(new Ordering(0, TeraKey.class, Order.ASCENDING), new TeraDistribution());

    sink.setInput(source);

    return new Plan(sink, "TeraSort");
  }
View Full Code Here


    projectN.setInput(nations);
    mapLi.setInput(lineitems);
    mapO.setInput(orders);

    // return the PACT plan
    Plan p = new Plan(result, "TPCH Q10");
    p.setDefaultParallelism(degreeOfParallelism);
    return p;
  }
View Full Code Here

  }

  @Override
  protected Plan getTestJob() {
    DanglingPageRank pr = new DanglingPageRank();
    Plan plan = pr.getPlan(
      String.valueOf(DOP),
      pagesPath,
      edgesPath,
      resultPath,
      "25"// max iterations
View Full Code Here

   
    iteration.setTerminationCriterion(termination);
   
    FileDataSink out = new FileDataSink(new PageWithRankOutFormat(), outputPath, iteration, "Final Ranks");

    Plan p = new Plan(out, "Simple PageRank");
    p.setDefaultParallelism(dop);
    return p;
  }
View Full Code Here

    closeTriads.setParameter("INPUT_SHIP_STRATEGY", "SHIP_REPARTITION_HASH");
    closeTriads.setParameter("LOCAL_STRATEGY", "LOCAL_STRATEGY_HASH_BUILD_SECOND");

    FileDataSink triangles = new FileDataSink(new TriangleOutputFormat(), output, closeTriads, "Triangles");

    Plan p = new Plan(triangles, "Enumerate Triangles");
    p.setDefaultParallelism(numSubTasks);
    return p;
  }
View Full Code Here

 
  @Test
  public void testCompileKMeansSingleStepWithStats() {
   
    KMeansSingleStep kmi = new KMeansSingleStep();
    Plan p = kmi.getPlan(String.valueOf(DEFAULT_PARALLELISM), IN_FILE, IN_FILE, OUT_FILE, String.valueOf(20));
   
    // set the statistics
    OperatorResolver cr = getContractResolver(p);
    FileDataSource pointsSource = cr.getNode(DATAPOINTS);
    FileDataSource centersSource = cr.getNode(CENTERS);
View Full Code Here

  @Test
  public void testCompileKMeansSingleStepWithOutStats() {
   
    KMeansSingleStep kmi = new KMeansSingleStep();
    Plan p = kmi.getPlan(String.valueOf(DEFAULT_PARALLELISM), IN_FILE, IN_FILE, OUT_FILE, String.valueOf(20));
   
    OptimizedPlan plan = compileNoStats(p);
    checkPlan(plan);
  }
View Full Code Here

  }
 
  private void checkWordCount(boolean estimates) {
    try {
      WordCount wc = new WordCount();
      Plan p = wc.getPlan(DEFAULT_PARALLELISM_STRING, IN_FILE, OUT_FILE);
     
      OptimizedPlan plan;
      if (estimates) {
        FileDataSource source = getContractResolver(p).getNode("Input Lines");
        setSourceStatistics(source, 1024*1024*1024*1024L, 24f);
View Full Code Here

        .field(IntValue.class, 1);
     
      Ordering ordering = new Ordering(0, StringValue.class, Order.DESCENDING);
      out.setGlobalOrder(ordering, new SimpleDistribution(new StringValue[] {new StringValue("N")}));
     
      Plan p = new Plan(out, "WordCount Example");
      p.setDefaultParallelism(DEFAULT_PARALLELISM);
 
      OptimizedPlan plan;
      if (estimates) {
        setSourceStatistics(sourceNode, 1024*1024*1024*1024L, 24f);
        plan = compileWithStats(p);
View Full Code Here

   */
  @Test
  public void testQueryNoStatistics() {
    try {
      TPCHQuery3 query = new TPCHQuery3();
      Plan p = query.getPlan(DEFAULT_PARALLELISM_STRING, IN_FILE, IN_FILE, OUT_FILE);
     
      // compile
      final OptimizedPlan plan = compileNoStats(p);
     
      final OptimizerPlanNodeResolver or = getOptimizerPlanNodeResolver(plan);
View Full Code Here

TOP

Related Classes of org.apache.flink.api.common.Plan

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.