Examples of PlanJSONDumpGenerator


Examples of eu.stratosphere.compiler.plandump.PlanJSONDumpGenerator

      }

      try {
        PactCompiler pc = new PactCompiler(new DataStatistics());
        OptimizedPlan op = pc.compile(plan);
        PlanJSONDumpGenerator gen = new PlanJSONDumpGenerator();
   
        return gen.getOptimizerPlanAsJSON(op);
      }
      finally {
        if (shutDownAtEnd) {
          stop();
        }
View Full Code Here

Examples of eu.stratosphere.compiler.plandump.PlanJSONDumpGenerator

    LocalExecutor exec = new LocalExecutor();
    try {
      exec.start();
      PactCompiler pc = new PactCompiler(new DataStatistics());
      OptimizedPlan op = pc.compile(plan);
      PlanJSONDumpGenerator gen = new PlanJSONDumpGenerator();

      return gen.getOptimizerPlanAsJSON(op);
    } finally {
      exec.stop();
    }
  }
View Full Code Here

Examples of eu.stratosphere.compiler.plandump.PlanJSONDumpGenerator

  /**
   * Return unoptimized plan as JSON.
   * @return
   */
  public static String getPlanAsJSON(Plan plan) {
    PlanJSONDumpGenerator gen = new PlanJSONDumpGenerator();
    List<DataSinkNode> sinks = PactCompiler.createPreOptimizedPlan(plan);
    return gen.getPactPlanAsJSON(sinks);
  }
View Full Code Here

Examples of eu.stratosphere.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

Examples of eu.stratosphere.compiler.plandump.PlanJSONDumpGenerator

  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

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

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

  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

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

  // ------------------------------------------------------------------------
  //                      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

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

  }
 
  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

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

  }
 
  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
TOP
Copyright © 2018 www.massapi.com. 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.