You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by aymanshalaby <aa...@marketwired.com> on 2014/06/24 23:12:52 UTC

Graphx SubGraph

Hi guys,

I am a newbie with Spark/Graphx. We are considering using Graphx in
production.
Our 1st use case is: given a sublist of vertices in the graph, we want to
return the induced edges between the vertices of this sublist.

Please correct me if I am wrong. Is that what does the subgraph function do?

Thanks,
Ayman :) 



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/Graphx-SubGraph-tp8197.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

Re: Graphx SubGraph

Posted by Ankur Dave <an...@gmail.com>.
Yes, the subgraph operator takes a vertex predicate and keeps only the
edges where both vertices satisfy the predicate, so it will work as long as
you can express the sublist in terms of a vertex predicate.

If that's not possible, you can still obtain the same effect, but you'll
have to use lower-level operations similar to how subgraph is itself
implemented. I can help out if that's the case.

Ankur <http://www.ankurdave.com/>