use of org.apache.flink.types.NullValue in project flink by apache.
the class EdgeDegreesPairTest method testWithRMatGraph.
@Test
public void testWithRMatGraph() throws Exception {
DataSet<Edge<LongValue, Tuple3<NullValue, Degrees, Degrees>>> degreesPair = directedRMatGraph.run(new EdgeDegreesPair<LongValue, NullValue, NullValue>());
Checksum checksum = new ChecksumHashCode<Edge<LongValue, Tuple3<NullValue, Degrees, Degrees>>>().run(degreesPair).execute();
assertEquals(12009, checksum.getCount());
assertEquals(0x0000176fe94702a3L, checksum.getChecksum());
}
use of org.apache.flink.types.NullValue in project flink by apache.
the class EdgeSourceDegreesTest method testWithRMatGraph.
@Test
public void testWithRMatGraph() throws Exception {
DataSet<Edge<LongValue, Tuple2<NullValue, Degrees>>> sourceDegrees = directedRMatGraph.run(new EdgeSourceDegrees<LongValue, NullValue, NullValue>());
Checksum checksum = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, Degrees>>>().run(sourceDegrees).execute();
assertEquals(12009, checksum.getCount());
assertEquals(0x0000162435fde1d9L, checksum.getChecksum());
}
use of org.apache.flink.types.NullValue in project flink by apache.
the class EdgeTargetDegreesTest method testWithRMatGraph.
@Test
public void testWithRMatGraph() throws Exception {
DataSet<Edge<LongValue, Tuple2<NullValue, Degrees>>> targetDegrees = directedRMatGraph.run(new EdgeTargetDegrees<LongValue, NullValue, NullValue>());
Checksum checksum = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, Degrees>>>().run(targetDegrees).execute();
assertEquals(12009, checksum.getCount());
assertEquals(0x0000160af450cc81L, checksum.getChecksum());
}
use of org.apache.flink.types.NullValue in project flink by apache.
the class VertexDegreesTest method testWithRMatGraph.
@Test
public void testWithRMatGraph() throws Exception {
DataSet<Vertex<LongValue, Degrees>> degrees = directedRMatGraph.run(new VertexDegrees<LongValue, NullValue, NullValue>());
Checksum checksum = new ChecksumHashCode<Vertex<LongValue, Degrees>>().run(degrees).execute();
assertEquals(902, checksum.getCount());
assertEquals(0x000001a3305dd86aL, checksum.getChecksum());
}
use of org.apache.flink.types.NullValue in project flink by apache.
the class EdgeDegreePairTest method testWithRMatGraph.
@Test
public void testWithRMatGraph() throws Exception {
DataSet<Edge<LongValue, Tuple3<NullValue, LongValue, LongValue>>> degreePairOnSourceId = undirectedRMatGraph.run(new EdgeDegreePair<LongValue, NullValue, NullValue>());
Checksum checksumOnSourceId = new ChecksumHashCode<Edge<LongValue, Tuple3<NullValue, LongValue, LongValue>>>().run(degreePairOnSourceId).execute();
assertEquals(20884, checksumOnSourceId.getCount());
assertEquals(0x00000001e051efe4L, checksumOnSourceId.getChecksum());
DataSet<Edge<LongValue, Tuple3<NullValue, LongValue, LongValue>>> degreePairOnTargetId = undirectedRMatGraph.run(new EdgeDegreePair<LongValue, NullValue, NullValue>().setReduceOnTargetId(true));
Checksum checksumOnTargetId = new ChecksumHashCode<Edge<LongValue, Tuple3<NullValue, LongValue, LongValue>>>().run(degreePairOnTargetId).execute();
assertEquals(checksumOnSourceId, checksumOnTargetId);
}
Aggregations