Package org.apache.flink.compiler.plandump

Examples of org.apache.flink.compiler.plandump.PlanJSONDumpGenerator


    }
    else {
      throw new RuntimeException();
    }
   
    PlanJSONDumpGenerator jsonGen = new PlanJSONDumpGenerator();
    StringWriter string = new StringWriter(1024);
    PrintWriter pw = null;
    try {
      pw = new PrintWriter(string);
      jsonGen.dumpPactPlanAsJSON(previewPlan, pw);
    } finally {
      pw.close();
    }
    return string.toString();
  }
View Full Code Here


  public String getExecutionPlan() throws Exception {
    Plan p = createProgramPlan("unnamed job");
   
    OptimizedPlan op = this.client.getOptimizedPlan(p, getDegreeOfParallelism());
   
    PlanJSONDumpGenerator gen = new PlanJSONDumpGenerator();
    return gen.getOptimizerPlanAsJSON(op);
  }
View Full Code Here

  // ------------------------------------------------------------------------
  //                      Compilation and Submission
  // ------------------------------------------------------------------------
 
  public String getOptimizedPlanAsJson(PackagedProgram prog, int parallelism) throws CompilerException, ProgramInvocationException {
    PlanJSONDumpGenerator jsonGen = new PlanJSONDumpGenerator();
    return jsonGen.getOptimizerPlanAsJSON(getOptimizedPlan(prog, parallelism));
  }
View Full Code Here

  }
 
  private void dump(Plan p) {
    try {
      OptimizedPlan op = compileNoStats(p);
      PlanJSONDumpGenerator dumper = new PlanJSONDumpGenerator();
      String json = dumper.getOptimizerPlanAsJSON(op);
      JsonParser parser = new JsonFactory().createJsonParser(json);
      while (parser.nextToken() != null);
    } catch (JsonParseException e) {
      e.printStackTrace();
      Assert.fail("JSON Generator produced malformatted output: " + e.getMessage());
View Full Code Here

  }
 
  private void dump(Plan p) {
    try {
      List<DataSinkNode> sinks = PactCompiler.createPreOptimizedPlan(p);
      PlanJSONDumpGenerator dumper = new PlanJSONDumpGenerator();
      String json = dumper.getPactPlanAsJSON(sinks);
      JsonParser parser = new JsonFactory().createJsonParser(json);
      while (parser.nextToken() != null);
    } catch (JsonParseException e) {
      e.printStackTrace();
      Assert.fail("JSON Generator produced malformatted output: " + e.getMessage());
View Full Code Here

    OptimizedPlan optPlan = compileNoStats(plan);
    OptimizerPlanNodeResolver or = getOptimizerPlanNodeResolver(optPlan);
   
    if (PRINT_PLAN) {
      PlanJSONDumpGenerator dumper = new PlanJSONDumpGenerator();
      String json = dumper.getOptimizerPlanAsJSON(optPlan);
      System.out.println(json);
    }
   
    SourcePlanNode vertexSource = or.getNode(VERTEX_SOURCE);
    SourcePlanNode edgesSource = or.getNode(EDGES_SOURCE);
View Full Code Here

    OptimizedPlan optPlan = compileNoStats(plan);
    OptimizerPlanNodeResolver or = getOptimizerPlanNodeResolver(optPlan);
   
    if (PRINT_PLAN) {
      PlanJSONDumpGenerator dumper = new PlanJSONDumpGenerator();
      String json = dumper.getOptimizerPlanAsJSON(optPlan);
      System.out.println(json);
    }
   
    SourcePlanNode vertexSource = or.getNode(VERTEX_SOURCE);
    SourcePlanNode edgesSource = or.getNode(EDGES_SOURCE);
View Full Code Here

    OptimizedPlan optPlan = compileNoStats(plan);
    OptimizerPlanNodeResolver or = getOptimizerPlanNodeResolver(optPlan);
   
    if (PRINT_PLAN) {
      PlanJSONDumpGenerator dumper = new PlanJSONDumpGenerator();
      String json = dumper.getOptimizerPlanAsJSON(optPlan);
      System.out.println(json);
    }
   
    SourcePlanNode vertexSource = or.getNode(VERTEX_SOURCE);
    SourcePlanNode edgesSource = or.getNode(EDGES_SOURCE);
View Full Code Here

     
      iter.closeWith(result.map(new IdentityMapper<Tuple2<Long,Long>>()), result).print();
     
      OptimizedPlan p = compileNoStats(env.createProgramPlan());
     
      new PlanJSONDumpGenerator().getOptimizerPlanAsJSON(p);
    }
    catch (Exception e) {
      e.printStackTrace();
      fail(e.getMessage());
    }
View Full Code Here

    @Override
    public String getExecutionPlan() throws Exception {
      OptimizedPlan op = compileProgram("unused");
     
      PlanJSONDumpGenerator jsonGen = new PlanJSONDumpGenerator();
      return jsonGen.getOptimizerPlanAsJSON(op);
    }
View Full Code Here

TOP

Related Classes of org.apache.flink.compiler.plandump.PlanJSONDumpGenerator

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.