public static String optimizerPlanAsJSON ( Plan plan ) throws Exception { final int parallelism = plan . getDefaultParallelism ( ) == ExecutionConfig . PARALLELISM_DEFAULT ? 1 : plan . getDefaultParallelism ( ) ; Optimizer pc = new Optimizer ( new DataStatistics ( ) , new Configuration ( ) ) ; pc . setDefaultParallelism ( parallelism ) ; OptimizedPlan op = pc . compile ( plan ) ; return new PlanJSONDumpGenerator ( ) . getOptimizerPlanAsJSON ( op ) ; }
Creates a JSON representation of the given dataflow s execution plan .