use of org.apache.flink.client.program.PreviewPlanEnvironment in project flink by apache.
the class PreviewPlanDumpTest method dumpWebLogAnalysis.
@Test
public void dumpWebLogAnalysis() {
// prepare the test environment
PreviewPlanEnvironment env = new PreviewPlanEnvironment();
env.setAsContext();
try {
org.apache.flink.examples.java.relational.WebLogAnalysis.main(new String[] { "--documents", IN_FILE, "--ranks", IN_FILE, "--visits", OUT_FILE, "--output", "123" });
} catch (OptimizerPlanEnvironment.ProgramAbortException pae) {
// all good.
} catch (Exception e) {
e.printStackTrace();
Assert.fail("WebLogAnalysis failed with an exception");
}
dump(env.getPlan());
}
use of org.apache.flink.client.program.PreviewPlanEnvironment in project flink by apache.
the class ConnectedComponentsCoGroupTest method getConnectedComponentsCoGroupPlan.
public static Plan getConnectedComponentsCoGroupPlan() {
// prepare the test environment
PreviewPlanEnvironment env = new PreviewPlanEnvironment();
env.setAsContext();
try {
ConnectedComponentsWithCoGroup(new String[] { DEFAULT_PARALLELISM_STRING, IN_FILE, IN_FILE, OUT_FILE, "100" });
} catch (ProgramAbortException pae) {
// all good.
} catch (Exception e) {
e.printStackTrace();
Assert.fail("ConnectedComponentsWithCoGroup failed with an exception");
}
return env.getPlan();
}
use of org.apache.flink.client.program.PreviewPlanEnvironment in project flink by apache.
the class KMeansSingleStepTest method getKMeansPlan.
public static Plan getKMeansPlan() {
// prepare the test environment
PreviewPlanEnvironment env = new PreviewPlanEnvironment();
env.setAsContext();
try {
KMeans(new String[] { IN_FILE, IN_FILE, OUT_FILE, "20" });
} catch (OptimizerPlanEnvironment.ProgramAbortException pae) {
// all good.
} catch (Exception e) {
e.printStackTrace();
Assert.fail("KMeans failed with an exception");
}
return env.getPlan();
}
use of org.apache.flink.client.program.PreviewPlanEnvironment in project flink by apache.
the class RelationalQueryCompilerTest method getTPCH3Plan.
public static Plan getTPCH3Plan() {
// prepare the test environment
PreviewPlanEnvironment env = new PreviewPlanEnvironment();
env.setAsContext();
try {
TCPH3(new String[] { DEFAULT_PARALLELISM_STRING, IN_FILE, IN_FILE, OUT_FILE });
} catch (OptimizerPlanEnvironment.ProgramAbortException pae) {
// all good.
} catch (Exception e) {
e.printStackTrace();
Assert.fail("TCPH3 failed with an exception");
}
return env.getPlan();
}
use of org.apache.flink.client.program.PreviewPlanEnvironment in project flink by apache.
the class PreviewPlanDumpTest method dumpTPCH3.
@Test
public void dumpTPCH3() {
// prepare the test environment
PreviewPlanEnvironment env = new PreviewPlanEnvironment();
env.setAsContext();
try {
TPCHQuery3.main(new String[] { "--lineitem", IN_FILE, "--customer", IN_FILE, "--orders", OUT_FILE, "--output", "123" });
} catch (OptimizerPlanEnvironment.ProgramAbortException pae) {
// all good.
} catch (Exception e) {
e.printStackTrace();
Assert.fail("TPCH3 failed with an exception");
}
dump(env.getPlan());
}
Aggregations