org.apache.flink.examples.java.graph.PageRank Java Examples
The following examples show how to use
org.apache.flink.examples.java.graph.PageRank.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PreviewPlanDumpTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@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()); }
Example #2
Source File: DumpCompiledPlanTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@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()); }
Example #3
Source File: PreviewPlanDumpTest.java From flink with Apache License 2.0 | 6 votes |
@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()); }
Example #4
Source File: DumpCompiledPlanTest.java From flink with Apache License 2.0 | 6 votes |
@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()); }
Example #5
Source File: PageRankITCase.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Test public void testPageRankSmallNumberOfIterations() throws Exception { PageRank.main(new String[]{ "--pages", verticesPath, "--links", edgesPath, "--output", resultPath, "--numPages", PageRankData.NUM_VERTICES + "", "--iterations", "3"}); expected = PageRankData.RANKS_AFTER_3_ITERATIONS; }
Example #6
Source File: PageRankITCase.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Test public void testPageRankWithConvergenceCriterion() throws Exception { PageRank.main(new String[]{ "--pages", verticesPath, "--links", edgesPath, "--output", resultPath, "--numPages", PageRankData.NUM_VERTICES + "", "--vertices", "1000"}); expected = PageRankData.RANKS_AFTER_EPSILON_0_0001_CONVERGENCE; }
Example #7
Source File: PageRankITCase.java From flink with Apache License 2.0 | 5 votes |
@Test public void testPageRankSmallNumberOfIterations() throws Exception { PageRank.main(new String[]{ "--pages", verticesPath, "--links", edgesPath, "--output", resultPath, "--numPages", PageRankData.NUM_VERTICES + "", "--iterations", "3"}); expected = PageRankData.RANKS_AFTER_3_ITERATIONS; }
Example #8
Source File: PageRankITCase.java From flink with Apache License 2.0 | 5 votes |
@Test public void testPageRankWithConvergenceCriterion() throws Exception { PageRank.main(new String[]{ "--pages", verticesPath, "--links", edgesPath, "--output", resultPath, "--numPages", PageRankData.NUM_VERTICES + "", "--vertices", "1000"}); expected = PageRankData.RANKS_AFTER_EPSILON_0_0001_CONVERGENCE; }
Example #9
Source File: PageRankITCase.java From flink with Apache License 2.0 | 5 votes |
@Test public void testPageRankSmallNumberOfIterations() throws Exception { PageRank.main(new String[]{ "--pages", verticesPath, "--links", edgesPath, "--output", resultPath, "--numPages", PageRankData.NUM_VERTICES + "", "--iterations", "3"}); expected = PageRankData.RANKS_AFTER_3_ITERATIONS; }
Example #10
Source File: PageRankITCase.java From flink with Apache License 2.0 | 5 votes |
@Test public void testPageRankWithConvergenceCriterion() throws Exception { PageRank.main(new String[]{ "--pages", verticesPath, "--links", edgesPath, "--output", resultPath, "--numPages", PageRankData.NUM_VERTICES + "", "--vertices", "1000"}); expected = PageRankData.RANKS_AFTER_EPSILON_0_0001_CONVERGENCE; }
Example #11
Source File: PreviewPlanDumpTest.java From flink with Apache License 2.0 | 5 votes |
@Test public void dumpPageRank() throws Exception { verifyPlanDump(PageRank.class, "--pages", IN_FILE, "--links", IN_FILE, "--output", OUT_FILE, "--numPages", "10", "--iterations", "123"); }
Example #12
Source File: DumpCompiledPlanTest.java From flink with Apache License 2.0 | 5 votes |
@Test public void dumpPageRank() throws Exception { verifyOptimizedPlan(PageRank.class, "--pages", IN_FILE, "--links", IN_FILE, "--output", OUT_FILE, "--numPages", "10", "--iterations", "123"); }