amplab/graphx — pull request #23 by jegonzal (2013-10-14 05:34:39+00:00)
Title: Indexed RDD version of GraphX

I have modified (a bit) of the GraphX code base to build around the IndexedRDD primitive (rather than using EdgeTrippletRDDs). I also slightly modified the Graph.scala interface to support a more natural interface given that the ```IndexedRDD[Vid,VD]``` acts like an ```RDD[(Vid,VD)]```. Here are a few of the key changes

```scala
// Now returns an RDD[(Vid,VD)] instead of RDD[Vertex[VD]]
def vertices: RDD[(Vid,VD)]

// Now takes a function from (Vid, VD) to VD2 instead of Vertex[VD] => VD2
def mapVertices[VD2: ClassManifest](map: (Vid, VD) => VD2): Graph[VD2, ED]

// Now returns an RDD with only the vertices that "received messages"
def mapReduceTriplets[A: ClassManifest](
mapFunc: EdgeTriplet[VD, ED] => Array[(Vid, A)],
reduceFunc: (A, A) => A)
: RDD[(Vid, A)]

// Now returns an rDD with only the vertices that "received messages"
def aggregateNeighbors[A: ClassManifest](
mapFunc: (Vid, EdgeTriplet[VD, ED]) => Option[A],
reduceFunc: (A, A) => A,
direction: EdgeDirection)
: RDD[(Vid, A)]

// Curried function + no longer operates on Vertex[VD] objects
def outerJoinVertices[U: ClassManifest, VD2: ClassManifest](table: RDD[(Vid, U)])
(mapFunc: (Vid, VD, Option[U]) => VD2)
: Graph[VD2, ED]
```

This code is not yet ready to be pulled in since I am still struggling with closure capture issues. However, please comment on the design changes.