org.apache.flink.graph.asm.dataset.ChecksumHashCode Java Examples
The following examples show how to use
org.apache.flink.graph.asm.dataset.ChecksumHashCode.
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: EdgeTargetDegreeTest.java From flink with Apache License 2.0 | 6 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Edge<LongValue, Tuple2<NullValue, LongValue>>> targetDegreeOnTargetId = undirectedRMatGraph(10, 16) .run(new EdgeTargetDegree<LongValue, NullValue, NullValue>() .setReduceOnSourceId(false)); Checksum checksumOnTargetId = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, LongValue>>>() .run(targetDegreeOnTargetId) .execute(); assertEquals(20884, checksumOnTargetId.getCount()); assertEquals(0x000000019d8f0070L, checksumOnTargetId.getChecksum()); DataSet<Edge<LongValue, Tuple2<NullValue, LongValue>>> targetDegreeOnSourceId = undirectedRMatGraph(10, 16) .run(new EdgeTargetDegree<LongValue, NullValue, NullValue>() .setReduceOnSourceId(true)); Checksum checksumOnSourceId = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, LongValue>>>() .run(targetDegreeOnSourceId) .execute(); assertEquals(checksumOnTargetId, checksumOnSourceId); }
Example #2
Source File: CommunityDetectionTest.java From flink with Apache License 2.0 | 6 votes |
@Test public void testWithRMatGraph() throws Exception { Graph<LongValue, Long, Double> result = undirectedRMatGraph(8, 4) .mapVertices(v -> v.getId().getValue(), new TypeHint<Vertex<LongValue, Long>>(){}.getTypeInfo()) .mapEdges(e -> (double) e.getTarget().getValue() - e.getSource().getValue(), new TypeHint<Edge<LongValue, Double>>(){}.getTypeInfo()) .run(new CommunityDetection<>(10, 0.5)); Checksum checksum = new ChecksumHashCode<Vertex<LongValue, Long>>() .run(result.getVertices()) .execute(); assertEquals(184, checksum.getCount()); assertEquals(0x00000000000cdc96L, checksum.getChecksum()); }
Example #3
Source File: EdgeDegreePairTest.java From flink with Apache License 2.0 | 6 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Edge<LongValue, Tuple3<NullValue, LongValue, LongValue>>> degreePairOnSourceId = undirectedRMatGraph(10, 16) .run(new EdgeDegreePair<LongValue, NullValue, NullValue>() .setReduceOnTargetId(false)); 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(10, 16) .run(new EdgeDegreePair<LongValue, NullValue, NullValue>() .setReduceOnTargetId(true)); Checksum checksumOnTargetId = new ChecksumHashCode<Edge<LongValue, Tuple3<NullValue, LongValue, LongValue>>>() .run(degreePairOnTargetId) .execute(); assertEquals(checksumOnSourceId, checksumOnTargetId); }
Example #4
Source File: EdgeSourceDegreeTest.java From flink with Apache License 2.0 | 6 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Edge<LongValue, Tuple2<NullValue, LongValue>>> sourceDegreeOnSourceId = undirectedRMatGraph(10, 16) .run(new EdgeSourceDegree<LongValue, NullValue, NullValue>() .setReduceOnTargetId(false)); Checksum checksumOnSourceId = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, LongValue>>>() .run(sourceDegreeOnSourceId) .execute(); assertEquals(20884, checksumOnSourceId.getCount()); assertEquals(0x000000019d8f0070L, checksumOnSourceId.getChecksum()); DataSet<Edge<LongValue, Tuple2<NullValue, LongValue>>> sourceDegreeOnTargetId = undirectedRMatGraph(10, 16) .run(new EdgeSourceDegree<LongValue, NullValue, NullValue>() .setReduceOnTargetId(true)); Checksum checksumOnTargetId = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, LongValue>>>() .run(sourceDegreeOnTargetId) .execute(); assertEquals(checksumOnTargetId, checksumOnTargetId); }
Example #5
Source File: EdgeTargetDegreeTest.java From flink with Apache License 2.0 | 6 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Edge<LongValue, Tuple2<NullValue, LongValue>>> targetDegreeOnTargetId = undirectedRMatGraph(10, 16) .run(new EdgeTargetDegree<LongValue, NullValue, NullValue>() .setReduceOnSourceId(false)); Checksum checksumOnTargetId = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, LongValue>>>() .run(targetDegreeOnTargetId) .execute(); assertEquals(20884, checksumOnTargetId.getCount()); assertEquals(0x000000019d8f0070L, checksumOnTargetId.getChecksum()); DataSet<Edge<LongValue, Tuple2<NullValue, LongValue>>> targetDegreeOnSourceId = undirectedRMatGraph(10, 16) .run(new EdgeTargetDegree<LongValue, NullValue, NullValue>() .setReduceOnSourceId(true)); Checksum checksumOnSourceId = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, LongValue>>>() .run(targetDegreeOnSourceId) .execute(); assertEquals(checksumOnTargetId, checksumOnSourceId); }
Example #6
Source File: VertexDegreeTest.java From flink with Apache License 2.0 | 6 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Vertex<LongValue, LongValue>> degreeOnSourceId = undirectedRMatGraph(10, 16) .run(new VertexDegree<LongValue, NullValue, NullValue>() .setReduceOnTargetId(false)); Checksum checksumOnSourceId = new ChecksumHashCode<Vertex<LongValue, LongValue>>() .run(degreeOnSourceId) .execute(); assertEquals(902, checksumOnSourceId.getCount()); assertEquals(0x0000000000e1fb30L, checksumOnSourceId.getChecksum()); DataSet<Vertex<LongValue, LongValue>> degreeOnTargetId = undirectedRMatGraph(10, 16) .run(new VertexDegree<LongValue, NullValue, NullValue>() .setReduceOnTargetId(true)); Checksum checksumOnTargetId = new ChecksumHashCode<Vertex<LongValue, LongValue>>() .run(degreeOnTargetId) .execute(); assertEquals(checksumOnSourceId, checksumOnTargetId); }
Example #7
Source File: CommunityDetectionTest.java From flink with Apache License 2.0 | 6 votes |
@Test public void testWithRMatGraph() throws Exception { Graph<LongValue, Long, Double> result = undirectedRMatGraph(8, 4) .mapVertices(v -> v.getId().getValue(), new TypeHint<Vertex<LongValue, Long>>(){}.getTypeInfo()) .mapEdges(e -> (double) e.getTarget().getValue() - e.getSource().getValue(), new TypeHint<Edge<LongValue, Double>>(){}.getTypeInfo()) .run(new CommunityDetection<>(10, 0.5)); Checksum checksum = new ChecksumHashCode<Vertex<LongValue, Long>>() .run(result.getVertices()) .execute(); assertEquals(184, checksum.getCount()); assertEquals(0x00000000000cdc96L, checksum.getChecksum()); }
Example #8
Source File: EdgeDegreePairTest.java From flink with Apache License 2.0 | 6 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Edge<LongValue, Tuple3<NullValue, LongValue, LongValue>>> degreePairOnSourceId = undirectedRMatGraph(10, 16) .run(new EdgeDegreePair<LongValue, NullValue, NullValue>() .setReduceOnTargetId(false)); 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(10, 16) .run(new EdgeDegreePair<LongValue, NullValue, NullValue>() .setReduceOnTargetId(true)); Checksum checksumOnTargetId = new ChecksumHashCode<Edge<LongValue, Tuple3<NullValue, LongValue, LongValue>>>() .run(degreePairOnTargetId) .execute(); assertEquals(checksumOnSourceId, checksumOnTargetId); }
Example #9
Source File: EdgeSourceDegreeTest.java From flink with Apache License 2.0 | 6 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Edge<LongValue, Tuple2<NullValue, LongValue>>> sourceDegreeOnSourceId = undirectedRMatGraph(10, 16) .run(new EdgeSourceDegree<LongValue, NullValue, NullValue>() .setReduceOnTargetId(false)); Checksum checksumOnSourceId = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, LongValue>>>() .run(sourceDegreeOnSourceId) .execute(); assertEquals(20884, checksumOnSourceId.getCount()); assertEquals(0x000000019d8f0070L, checksumOnSourceId.getChecksum()); DataSet<Edge<LongValue, Tuple2<NullValue, LongValue>>> sourceDegreeOnTargetId = undirectedRMatGraph(10, 16) .run(new EdgeSourceDegree<LongValue, NullValue, NullValue>() .setReduceOnTargetId(true)); Checksum checksumOnTargetId = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, LongValue>>>() .run(sourceDegreeOnTargetId) .execute(); assertEquals(checksumOnTargetId, checksumOnTargetId); }
Example #10
Source File: VertexDegreeTest.java From flink with Apache License 2.0 | 6 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Vertex<LongValue, LongValue>> degreeOnSourceId = undirectedRMatGraph(10, 16) .run(new VertexDegree<LongValue, NullValue, NullValue>() .setReduceOnTargetId(false)); Checksum checksumOnSourceId = new ChecksumHashCode<Vertex<LongValue, LongValue>>() .run(degreeOnSourceId) .execute(); assertEquals(902, checksumOnSourceId.getCount()); assertEquals(0x0000000000e1fb30L, checksumOnSourceId.getChecksum()); DataSet<Vertex<LongValue, LongValue>> degreeOnTargetId = undirectedRMatGraph(10, 16) .run(new VertexDegree<LongValue, NullValue, NullValue>() .setReduceOnTargetId(true)); Checksum checksumOnTargetId = new ChecksumHashCode<Vertex<LongValue, LongValue>>() .run(degreeOnTargetId) .execute(); assertEquals(checksumOnSourceId, checksumOnTargetId); }
Example #11
Source File: CommunityDetectionTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Test public void testWithRMatGraph() throws Exception { Graph<LongValue, Long, Double> result = undirectedRMatGraph(8, 4) .mapVertices(v -> v.getId().getValue(), new TypeHint<Vertex<LongValue, Long>>(){}.getTypeInfo()) .mapEdges(e -> (double) e.getTarget().getValue() - e.getSource().getValue(), new TypeHint<Edge<LongValue, Double>>(){}.getTypeInfo()) .run(new CommunityDetection<>(10, 0.5)); Checksum checksum = new ChecksumHashCode<Vertex<LongValue, Long>>() .run(result.getVertices()) .execute(); assertEquals(184, checksum.getCount()); assertEquals(0x00000000000cdc96L, checksum.getChecksum()); }
Example #12
Source File: EdgeDegreePairTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Edge<LongValue, Tuple3<NullValue, LongValue, LongValue>>> degreePairOnSourceId = undirectedRMatGraph(10, 16) .run(new EdgeDegreePair<LongValue, NullValue, NullValue>() .setReduceOnTargetId(false)); 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(10, 16) .run(new EdgeDegreePair<LongValue, NullValue, NullValue>() .setReduceOnTargetId(true)); Checksum checksumOnTargetId = new ChecksumHashCode<Edge<LongValue, Tuple3<NullValue, LongValue, LongValue>>>() .run(degreePairOnTargetId) .execute(); assertEquals(checksumOnSourceId, checksumOnTargetId); }
Example #13
Source File: VertexDegreeTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Vertex<LongValue, LongValue>> degreeOnSourceId = undirectedRMatGraph(10, 16) .run(new VertexDegree<LongValue, NullValue, NullValue>() .setReduceOnTargetId(false)); Checksum checksumOnSourceId = new ChecksumHashCode<Vertex<LongValue, LongValue>>() .run(degreeOnSourceId) .execute(); assertEquals(902, checksumOnSourceId.getCount()); assertEquals(0x0000000000e1fb30L, checksumOnSourceId.getChecksum()); DataSet<Vertex<LongValue, LongValue>> degreeOnTargetId = undirectedRMatGraph(10, 16) .run(new VertexDegree<LongValue, NullValue, NullValue>() .setReduceOnTargetId(true)); Checksum checksumOnTargetId = new ChecksumHashCode<Vertex<LongValue, LongValue>>() .run(degreeOnTargetId) .execute(); assertEquals(checksumOnSourceId, checksumOnTargetId); }
Example #14
Source File: EdgeTargetDegreeTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Edge<LongValue, Tuple2<NullValue, LongValue>>> targetDegreeOnTargetId = undirectedRMatGraph(10, 16) .run(new EdgeTargetDegree<LongValue, NullValue, NullValue>() .setReduceOnSourceId(false)); Checksum checksumOnTargetId = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, LongValue>>>() .run(targetDegreeOnTargetId) .execute(); assertEquals(20884, checksumOnTargetId.getCount()); assertEquals(0x000000019d8f0070L, checksumOnTargetId.getChecksum()); DataSet<Edge<LongValue, Tuple2<NullValue, LongValue>>> targetDegreeOnSourceId = undirectedRMatGraph(10, 16) .run(new EdgeTargetDegree<LongValue, NullValue, NullValue>() .setReduceOnSourceId(true)); Checksum checksumOnSourceId = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, LongValue>>>() .run(targetDegreeOnSourceId) .execute(); assertEquals(checksumOnTargetId, checksumOnSourceId); }
Example #15
Source File: EdgeSourceDegreeTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Edge<LongValue, Tuple2<NullValue, LongValue>>> sourceDegreeOnSourceId = undirectedRMatGraph(10, 16) .run(new EdgeSourceDegree<LongValue, NullValue, NullValue>() .setReduceOnTargetId(false)); Checksum checksumOnSourceId = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, LongValue>>>() .run(sourceDegreeOnSourceId) .execute(); assertEquals(20884, checksumOnSourceId.getCount()); assertEquals(0x000000019d8f0070L, checksumOnSourceId.getChecksum()); DataSet<Edge<LongValue, Tuple2<NullValue, LongValue>>> sourceDegreeOnTargetId = undirectedRMatGraph(10, 16) .run(new EdgeSourceDegree<LongValue, NullValue, NullValue>() .setReduceOnTargetId(true)); Checksum checksumOnTargetId = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, LongValue>>>() .run(sourceDegreeOnTargetId) .execute(); assertEquals(checksumOnTargetId, checksumOnTargetId); }
Example #16
Source File: VertexDegreesTest.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Vertex<LongValue, Degrees>> degrees = directedRMatGraph(10, 16) .run(new VertexDegrees<>()); Checksum checksum = new ChecksumHashCode<Vertex<LongValue, Degrees>>() .run(degrees) .execute(); assertEquals(902, checksum.getCount()); assertEquals(0x000001a3305dd86aL, checksum.getChecksum()); }
Example #17
Source File: Hash.java From flink with Apache License 2.0 | 5 votes |
@Override public void write(String executionName, PrintStream out, DataSet<T> data) throws Exception { ChecksumHashCode<T> checksumHashCode = new ChecksumHashCode<T>().run(data); if (printExecutionPlan.getValue()) { out.println(); out.println(data.getExecutionEnvironment().getExecutionPlan()); } ChecksumHashCode.Checksum checksum = checksumHashCode .execute(executionName); out.println(); out.println(checksum); }
Example #18
Source File: VertexOutDegreeTest.java From flink with Apache License 2.0 | 5 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Vertex<LongValue, LongValue>> outDegree = directedRMatGraph(10, 16) .run(new VertexOutDegree<LongValue, NullValue, NullValue>() .setIncludeZeroDegreeVertices(true)); Checksum checksum = new ChecksumHashCode<Vertex<LongValue, LongValue>>() .run(outDegree) .execute(); assertEquals(902, checksum.getCount()); assertEquals(0x0000000000e1d885L, checksum.getChecksum()); }
Example #19
Source File: EdgeDegreesPairTest.java From flink with Apache License 2.0 | 5 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Edge<LongValue, Tuple3<NullValue, Degrees, Degrees>>> degreesPair = directedRMatGraph(10, 16) .run(new EdgeDegreesPair<>()); Checksum checksum = new ChecksumHashCode<Edge<LongValue, Tuple3<NullValue, Degrees, Degrees>>>() .run(degreesPair) .execute(); assertEquals(12009, checksum.getCount()); assertEquals(0x0000176fe94702a3L, checksum.getChecksum()); }
Example #20
Source File: EdgeSourceDegreesTest.java From flink with Apache License 2.0 | 5 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Edge<LongValue, Tuple2<NullValue, Degrees>>> sourceDegrees = directedRMatGraph(10, 16) .run(new EdgeSourceDegrees<>()); Checksum checksum = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, Degrees>>>() .run(sourceDegrees) .execute(); assertEquals(12009, checksum.getCount()); assertEquals(0x0000162435fde1d9L, checksum.getChecksum()); }
Example #21
Source File: VertexInDegreeTest.java From flink with Apache License 2.0 | 5 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Vertex<LongValue, LongValue>> inDegree = directedRMatGraph(10, 16) .run(new VertexInDegree<LongValue, NullValue, NullValue>() .setIncludeZeroDegreeVertices(true)); Checksum checksum = new ChecksumHashCode<Vertex<LongValue, LongValue>>() .run(inDegree) .execute(); assertEquals(902, checksum.getCount()); assertEquals(0x0000000000e1d885L, checksum.getChecksum()); }
Example #22
Source File: VertexDegreesTest.java From flink with Apache License 2.0 | 5 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Vertex<LongValue, Degrees>> degrees = directedRMatGraph(10, 16) .run(new VertexDegrees<>()); Checksum checksum = new ChecksumHashCode<Vertex<LongValue, Degrees>>() .run(degrees) .execute(); assertEquals(902, checksum.getCount()); assertEquals(0x000001a3305dd86aL, checksum.getChecksum()); }
Example #23
Source File: EdgeTargetDegreesTest.java From flink with Apache License 2.0 | 5 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Edge<LongValue, Tuple2<NullValue, Degrees>>> targetDegrees = directedRMatGraph(10, 16) .run(new EdgeTargetDegrees<>()); Checksum checksum = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, Degrees>>>() .run(targetDegrees) .execute(); assertEquals(12009, checksum.getCount()); assertEquals(0x0000160af450cc81L, checksum.getChecksum()); }
Example #24
Source File: TriangleListingTest.java From flink with Apache License 2.0 | 5 votes |
@Test public void testCompleteGraph() throws Exception { long expectedDegree = completeGraphVertexCount - 1; long expectedCount = completeGraphVertexCount * CombinatoricsUtils.binomialCoefficient((int) expectedDegree, 2) / 3; DataSet<Result<LongValue>> tl = completeGraph .run(new TriangleListing<>()); Checksum checksum = new ChecksumHashCode<Result<LongValue>>() .run(tl) .execute(); assertEquals(expectedCount, checksum.getCount()); }
Example #25
Source File: VertexInDegreeTest.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Vertex<LongValue, LongValue>> inDegree = directedRMatGraph(10, 16) .run(new VertexInDegree<LongValue, NullValue, NullValue>() .setIncludeZeroDegreeVertices(true)); Checksum checksum = new ChecksumHashCode<Vertex<LongValue, LongValue>>() .run(inDegree) .execute(); assertEquals(902, checksum.getCount()); assertEquals(0x0000000000e1d885L, checksum.getChecksum()); }
Example #26
Source File: EdgeSourceDegreesTest.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Edge<LongValue, Tuple2<NullValue, Degrees>>> sourceDegrees = directedRMatGraph(10, 16) .run(new EdgeSourceDegrees<>()); Checksum checksum = new ChecksumHashCode<Edge<LongValue, Tuple2<NullValue, Degrees>>>() .run(sourceDegrees) .execute(); assertEquals(12009, checksum.getCount()); assertEquals(0x0000162435fde1d9L, checksum.getChecksum()); }
Example #27
Source File: EdgeDegreesPairTest.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Edge<LongValue, Tuple3<NullValue, Degrees, Degrees>>> degreesPair = directedRMatGraph(10, 16) .run(new EdgeDegreesPair<>()); Checksum checksum = new ChecksumHashCode<Edge<LongValue, Tuple3<NullValue, Degrees, Degrees>>>() .run(degreesPair) .execute(); assertEquals(12009, checksum.getCount()); assertEquals(0x0000176fe94702a3L, checksum.getChecksum()); }
Example #28
Source File: JaccardIndexTest.java From flink with Apache License 2.0 | 5 votes |
@Test public void testWithRMatGraph() throws Exception { DataSet<Result<LongValue>> ji = undirectedRMatGraph(8, 8) .run(new JaccardIndex<LongValue, NullValue, NullValue>() .setGroupSize(4)); Checksum checksum = new ChecksumHashCode<Result<LongValue>>() .run(ji) .execute(); assertEquals(13954, checksum.getCount()); assertEquals(0x00001b1a1f7a9d0bL, checksum.getChecksum()); }
Example #29
Source File: TriangleListingTest.java From flink with Apache License 2.0 | 5 votes |
@Test public void testRMatGraph() throws Exception { DataSet<Result<LongValue>> tl = directedRMatGraph(10, 16) .run(new TriangleListing<LongValue, NullValue, NullValue>() .setSortTriangleVertices(true)); Checksum checksum = new ChecksumHashCode<Result<LongValue>>() .run(tl) .execute(); assertEquals(75049, checksum.getCount()); assertEquals(0x000092399c79299eL, checksum.getChecksum()); }
Example #30
Source File: LocalClusteringCoefficientTest.java From flink with Apache License 2.0 | 5 votes |
@Test public void testRMatGraph() throws Exception { DataSet<Result<LongValue>> cc = undirectedRMatGraph(10, 16) .run(new LocalClusteringCoefficient<>()); Checksum checksum = new ChecksumHashCode<Result<LongValue>>() .run(cc) .execute(); assertEquals(902, checksum.getCount()); assertEquals(0x000001cab2d3677bL, checksum.getChecksum()); }