Package eu.stratosphere.compiler.plandump

Examples of eu.stratosphere.compiler.plandump.PlanJSONDumpGenerator


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


   
    PactCompiler pc = new PactCompiler(new DataStatistics());
    OptimizedPlan op = pc.compile(p);
   
    if (printPlan) {
      System.out.println(new PlanJSONDumpGenerator().getOptimizerPlanAsJSON(op));
    }

    NepheleJobGraphGenerator jgg = new NepheleJobGraphGenerator();
    return jgg.compileJobGraph(op);
  }
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

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

        } while (this.submittedJobs.containsKey(uid));

        // dump the job to a JSON file
        String planName = uid + ".json";
        File jsonFile = new File(this.planDumpDirectory, planName);
        new PlanJSONDumpGenerator().dumpOptimizerPlanAsJSON(optPlan, jsonFile);

        // submit the job only, if it should not be suspended
        if (!suspend) {
          try {
            this.client.run(program, optPlan, false);
View Full Code Here

  }

  @Override
  public String getOptimizerPlanAsJSON(Plan plan) throws Exception {
    OptimizedPlan op = client.getOptimizedPlan(new JobWithJars(plan, this.jarFiles), -1);
    PlanJSONDumpGenerator jsonGen = new PlanJSONDumpGenerator();
    return jsonGen.getOptimizerPlanAsJSON(op);
  }
View Full Code Here

TOP

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