Skip to content

Commit 581e9ee

Browse files
committed
TODO: VertexRDDSuite
1 parent 20d80a3 commit 581e9ee

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

graphx/src/test/scala/org/apache/spark/graphx/VertexRDDSuite.scala

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ class VertexRDDSuite extends FunSuite with LocalSparkContext {
2929
VertexRDD(sc.parallelize((0 to n).map(x => (x.toLong, x)), 5))
3030
}
3131

32+
def verticesDup(sc: SparkContext, n: Int) = {
33+
VertexRDD(sc.parallelize((-n to n).map(x => (math.abs(x.toLong), x)), 5)
34+
}
35+
3236
test("filter") {
3337
withSpark { sc =>
3438
val n = 100
@@ -99,4 +103,14 @@ class VertexRDDSuite extends FunSuite with LocalSparkContext {
99103
}
100104
}
101105

106+
// TODO:
107+
// need edges in apply function
108+
test("apply.mergeFunc") {
109+
withSpark { sc =>
110+
val n = 100
111+
val verts = vertices(sc, n)
112+
val evens = verts.filter(q => ((q._2 % 2) == 0))
113+
assert(evens.count === (0 to n).filter(_ % 2 == 0).size)
114+
}
115+
}
102116
}

0 commit comments

Comments
 (0)