Done.


On Wed, Jan 22, 2014 at 1:21 PM, Ankur Dave <notifications@github.com>wrote:

> In graphx/src/main/scala/org/apache/spark/graphx/GraphOps.scala:
>
> > +   * @param edgeDirection the direction along which to collect
> > +   * the local edges of vertices
> > +   *
> > +   * @return the local edges for each vertex
> > +   */
> > +  def collectEdges(edgeDirection: EdgeDirection): VertexRDD[Array[Edge[ED]]] = {
> > +    graph.mapReduceTriplets[Array[Edge[ED]]](
> > +      edge => {
> > +        val msgToSrc = (edge.srcId, Array(new Edge(edge.srcId, edge.dstId, edge.attr)))
> > +        val msgToDst = (edge.dstId, Array(new Edge(edge.srcId, edge.dstId, edge.attr)))
> > +        edgeDirection match {
> > +          case EdgeDirection.Either => Iterator(msgToSrc, msgToDst)
> > +          case EdgeDirection.In => Iterator(msgToDst)
> > +          case EdgeDirection.Out => Iterator(msgToSrc)
> > +          case EdgeDirection.Both =>
> > +            throw new SparkException("collectLocalEdges does not support EdgeDirection.Both. Use" +
>
> collectLocalEdges -> collectEdges
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/apache/incubator-spark/pull/457/files#r9092644>
> .
>