org.apache.flink.graph.asm.translate.translators.LongToLongValue Java Examples

The following examples show how to use org.apache.flink.graph.asm.translate.translators.LongToLongValue. 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: GatherSumApplyITCase.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Test
public void testConnectedComponentsWithObjectReuseEnabled() throws Exception {
	final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
	env.getConfig().enableObjectReuse();

	DataSet<Edge<LongValue, NullValue>> edges = Translate.translateEdgeIds(
		ConnectedComponentsDefaultData.getDefaultEdgeDataSet(env),
		new LongToLongValue());

	Graph<LongValue, LongValue, NullValue> inputGraph = Graph.fromDataSet(
		edges, new IdentityMapper<>(), env);

	List<Vertex<LongValue, LongValue>> result = inputGraph.run(
		new GSAConnectedComponents<>(16)).collect();

	compareResultAsTuples(result, expectedResultCC);
}
 
Example #2
Source File: GatherSumApplyITCase.java    From flink with Apache License 2.0 6 votes vote down vote up
@Test
public void testConnectedComponentsWithObjectReuseEnabled() throws Exception {
	final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
	env.getConfig().enableObjectReuse();

	DataSet<Edge<LongValue, NullValue>> edges = Translate.translateEdgeIds(
		ConnectedComponentsDefaultData.getDefaultEdgeDataSet(env),
		new LongToLongValue());

	Graph<LongValue, LongValue, NullValue> inputGraph = Graph.fromDataSet(
		edges, new IdentityMapper<>(), env);

	List<Vertex<LongValue, LongValue>> result = inputGraph.run(
		new GSAConnectedComponents<>(16)).collect();

	compareResultAsTuples(result, expectedResultCC);
}
 
Example #3
Source File: GatherSumApplyITCase.java    From flink with Apache License 2.0 6 votes vote down vote up
@Test
public void testConnectedComponentsWithObjectReuseEnabled() throws Exception {
	final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
	env.getConfig().enableObjectReuse();

	DataSet<Edge<LongValue, NullValue>> edges = Translate.translateEdgeIds(
		ConnectedComponentsDefaultData.getDefaultEdgeDataSet(env),
		new LongToLongValue());

	Graph<LongValue, LongValue, NullValue> inputGraph = Graph.fromDataSet(
		edges, new IdentityMapper<>(), env);

	List<Vertex<LongValue, LongValue>> result = inputGraph.run(
		new GSAConnectedComponents<>(16)).collect();

	compareResultAsTuples(result, expectedResultCC);
}