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 <[email protected]> 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: [email protected] > For additional commands, e-mail: [email protected] > >
