Github user ankurdave commented on the pull request:
https://github.com/apache/spark/pull/1903#issuecomment-52587969
This looks good! A test would be good too. VertexRDDSuite seems like the
right place, since nothing else actually calls this variant of VertexRDD.apply.
It should be OK to create an empty EdgeRDD in VertexRDDSuite for testing
purposes.
Here's a simple test:
val verts = sc.parallelize(List((0L, 1), (0L, 2), (1L, 3)))
val edges = EdgeRDD.fromEdges(sc.parallelize(List.empty[Edge[Int]]))
val rdd = VertexRDD(verts, edges, 0, (a: Int, b: Int) => a + b)
assert(rdd.collect.toSet == Set((0L, 3), (1L, 3)))
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]