Java Code Examples for org.apache.flink.graph.test.TestGraphUtils#getLongLongVertexData()
The following examples show how to use
org.apache.flink.graph.test.TestGraphUtils#getLongLongVertexData() .
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: GraphCreationITCase.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Test public void testValidate() throws Exception { /* * Test validate(): */ final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); DataSet<Vertex<Long, Long>> vertices = TestGraphUtils.getLongLongVertexData(env); DataSet<Edge<Long, Long>> edges = TestGraphUtils.getLongLongEdgeData(env); Graph<Long, Long, Long> graph = Graph.fromDataSet(vertices, edges, env); Boolean valid = graph.validate(new InvalidVertexIdsValidator<>()); //env.fromElements(result).writeAsText(resultPath); String res = valid.toString(); //env.fromElements(valid); List<String> result = new LinkedList<>(); result.add(res); expectedResult = "true"; compareResultAsText(result, expectedResult); }
Example 2
Source File: GraphCreationITCase.java From flink with Apache License 2.0 | 6 votes |
@Test public void testValidate() throws Exception { /* * Test validate(): */ final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); DataSet<Vertex<Long, Long>> vertices = TestGraphUtils.getLongLongVertexData(env); DataSet<Edge<Long, Long>> edges = TestGraphUtils.getLongLongEdgeData(env); Graph<Long, Long, Long> graph = Graph.fromDataSet(vertices, edges, env); Boolean valid = graph.validate(new InvalidVertexIdsValidator<>()); //env.fromElements(result).writeAsText(resultPath); String res = valid.toString(); //env.fromElements(valid); List<String> result = new LinkedList<>(); result.add(res); expectedResult = "true"; compareResultAsText(result, expectedResult); }
Example 3
Source File: GraphCreationITCase.java From flink with Apache License 2.0 | 6 votes |
@Test public void testValidate() throws Exception { /* * Test validate(): */ final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); DataSet<Vertex<Long, Long>> vertices = TestGraphUtils.getLongLongVertexData(env); DataSet<Edge<Long, Long>> edges = TestGraphUtils.getLongLongEdgeData(env); Graph<Long, Long, Long> graph = Graph.fromDataSet(vertices, edges, env); Boolean valid = graph.validate(new InvalidVertexIdsValidator<>()); //env.fromElements(result).writeAsText(resultPath); String res = valid.toString(); //env.fromElements(valid); List<String> result = new LinkedList<>(); result.add(res); expectedResult = "true"; compareResultAsText(result, expectedResult); }
Example 4
Source File: TypeExtractorTest.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Before public void setUp() throws Exception { env = ExecutionEnvironment.getExecutionEnvironment(); vertices = TestGraphUtils.getLongLongVertexData(env); edges = TestGraphUtils.getLongLongEdgeData(env); inputGraph = Graph.fromDataSet(vertices, edges, env); }
Example 5
Source File: TypeExtractorTest.java From flink with Apache License 2.0 | 5 votes |
@Before public void setUp() throws Exception { env = ExecutionEnvironment.getExecutionEnvironment(); vertices = TestGraphUtils.getLongLongVertexData(env); edges = TestGraphUtils.getLongLongEdgeData(env); inputGraph = Graph.fromDataSet(vertices, edges, env); }
Example 6
Source File: TypeExtractorTest.java From flink with Apache License 2.0 | 5 votes |
@Before public void setUp() throws Exception { env = ExecutionEnvironment.getExecutionEnvironment(); vertices = TestGraphUtils.getLongLongVertexData(env); edges = TestGraphUtils.getLongLongEdgeData(env); inputGraph = Graph.fromDataSet(vertices, edges, env); }