Excellent! Thanks Andy. I will give it a go.
On Thu, Oct 2, 2014 at 12:42 AM, andy petrella [via Apache Spark User List] <ml-node+s1001560n15487...@n3.nabble.com> wrote: > I'll try my best ;-). > > 1/ you could create a abstract type for the types (1 on top of Vs, 1 other > on top of Es types) than use the subclasses as payload in your VertexRDD or > in your Edge. Regarding storage and files, it doesn't really matter (unless > you want to use the OOTB loading method, thus you need to cope with the > convention used). What could be done is to have on file per type and then > load them all in Spark, then union them all as a whole vertex rdd or edge > rdd. > > 2/ AFAIK there are local indices in GraphX (implicits ones per partition) > so that index lookup is very fast based on the VertexId. Given that, it > shouldn't be usefull to have another index. Unless, you want specific > lookups, in this case you could have your own lookup from X → VertexId then > use the usual `lookup` > > my2€ > > aℕdy ℙetrella > about.me/noootsab > [image: aℕdy ℙetrella on about.me] > > <http://about.me/noootsab> > > On Wed, Oct 1, 2014 at 4:35 PM, Oshi <[hidden email] > <http://user/SendEmail.jtp?type=node&node=15487&i=0>> wrote: > >> Hi, >> >> Sorry this question may be trivial. I'm new to Spark and GraphX. I need to >> create a graph that has different types of nodes(3 types) and edges(4 >> types). Each type of node and edge has a different list of attributes. >> >> 1) How should I build the graph? Should I specify all types of nodes(or >> edges) in one input file to create the vertexRDD(or edgeRDD)? >> 2) Is it possible to create indices on the type of node to make searching >> faster? >> >> Thanks!! >> >> >> >> >> >> -- >> View this message in context: >> http://apache-spark-user-list.1001560.n3.nabble.com/GraphX-Types-for-the-Nodes-and-Edges-tp15486.html >> Sent from the Apache Spark User List mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> <http://user/SendEmail.jtp?type=node&node=15487&i=1> >> For additional commands, e-mail: [hidden email] >> <http://user/SendEmail.jtp?type=node&node=15487&i=2> >> >> > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://apache-spark-user-list.1001560.n3.nabble.com/GraphX-Types-for-the-Nodes-and-Edges-tp15486p15487.html > To unsubscribe from GraphX: Types for the Nodes and Edges, click here > <http://apache-spark-user-list.1001560.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=15486&code=b3NoY3hqY0BnbWFpbC5jb218MTU0ODZ8LTY5NjU5MzYwNw==> > . > NAML > <http://apache-spark-user-list.1001560.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- Osh -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/GraphX-Types-for-the-Nodes-and-Edges-tp15486p15564.html Sent from the Apache Spark User List mailing list archive at Nabble.com.