use of org.apache.flink.client.program.PreviewPlanEnvironment in project flink by apache.
the class PreviewPlanDumpTest method dumpPageRank.
@Test
public void dumpPageRank() {
// prepare the test environment
PreviewPlanEnvironment env = new PreviewPlanEnvironment();
env.setAsContext();
try {
// --pages <path> --links <path> --output <path> --numPages <n> --iterations <n>
PageRank.main(new String[] { "--pages", IN_FILE, "--links", IN_FILE, "--output", OUT_FILE, "--numPages", "10", "--iterations", "123" });
} catch (OptimizerPlanEnvironment.ProgramAbortException pae) {
// all good.
} catch (Exception e) {
e.printStackTrace();
Assert.fail("PageRank failed with an exception");
}
dump(env.getPlan());
}
use of org.apache.flink.client.program.PreviewPlanEnvironment in project flink by apache.
the class DumpCompiledPlanTest 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());
}
use of org.apache.flink.client.program.PreviewPlanEnvironment in project flink by apache.
the class DumpCompiledPlanTest method dumpPageRank.
@Test
public void dumpPageRank() {
// prepare the test environment
PreviewPlanEnvironment env = new PreviewPlanEnvironment();
env.setAsContext();
try {
PageRank.main(new String[] { "--pages", IN_FILE, "--links", IN_FILE, "--output", OUT_FILE, "--numPages", "10", "--iterations", "123" });
} catch (OptimizerPlanEnvironment.ProgramAbortException pae) {
// all good.
} catch (Exception e) {
e.printStackTrace();
Assert.fail("PageRank failed with an exception");
}
dump(env.getPlan());
}
use of org.apache.flink.client.program.PreviewPlanEnvironment in project flink by apache.
the class DumpCompiledPlanTest method dumpBulkIterationKMeans.
@Test
public void dumpBulkIterationKMeans() {
// prepare the test environment
PreviewPlanEnvironment env = new PreviewPlanEnvironment();
env.setAsContext();
try {
ConnectedComponents.main(new String[] { "--vertices", IN_FILE, "--edges", IN_FILE, "--output", OUT_FILE, "--iterations", "123" });
} catch (OptimizerPlanEnvironment.ProgramAbortException pae) {
// all good.
} catch (Exception e) {
e.printStackTrace();
Assert.fail("ConnectedComponents failed with an exception");
}
dump(env.getPlan());
}
use of org.apache.flink.client.program.PreviewPlanEnvironment in project flink by apache.
the class DumpCompiledPlanTest method dumpWebLogAnalysis.
@Test
public void dumpWebLogAnalysis() {
// prepare the test environment
PreviewPlanEnvironment env = new PreviewPlanEnvironment();
env.setAsContext();
try {
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());
}
Aggregations