use of org.apache.flink.client.program.PreviewPlanEnvironment in project flink by apache.
the class DumpCompiledPlanTest method dumpWordCount.
@Test
public void dumpWordCount() {
// prepare the test environment
PreviewPlanEnvironment env = new PreviewPlanEnvironment();
env.setAsContext();
try {
WordCount.main(new String[] { "--input", IN_FILE, "--output", OUT_FILE });
} catch (OptimizerPlanEnvironment.ProgramAbortException pae) {
// all good.
} catch (Exception e) {
e.printStackTrace();
Assert.fail("WordCount failed with an exception");
}
dump(env.getPlan());
}
Aggregations