Skip to content

Commit

Permalink
TODO: VertexRDDSuite
Browse files Browse the repository at this point in the history
  • Loading branch information
larryxiao committed Aug 12, 2014
1 parent 20d80a3 commit 581e9ee
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions graphx/src/test/scala/org/apache/spark/graphx/VertexRDDSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ class VertexRDDSuite extends FunSuite with LocalSparkContext {
VertexRDD(sc.parallelize((0 to n).map(x => (x.toLong, x)), 5))
}

def verticesDup(sc: SparkContext, n: Int) = {
VertexRDD(sc.parallelize((-n to n).map(x => (math.abs(x.toLong), x)), 5)
}

test("filter") {
withSpark { sc =>
val n = 100
Expand Down Expand Up @@ -99,4 +103,14 @@ class VertexRDDSuite extends FunSuite with LocalSparkContext {
}
}

// TODO:
// need edges in apply function
test("apply.mergeFunc") {
withSpark { sc =>
val n = 100
val verts = vertices(sc, n)
val evens = verts.filter(q => ((q._2 % 2) == 0))
assert(evens.count === (0 to n).filter(_ % 2 == 0).size)
}
}
}

0 comments on commit 581e9ee

Please sign in to comment.