At 2014-08-19 12:47:16 -0700, spr <s...@yarcdata.com> wrote:
> One follow-up question.  If I just wanted to get those values into a vanilla
> variable (not a VertexRDD or Graph or ...) so I could easily look at them in
> the REPL, what would I do?  Are the aggregate data structures inside the
> VertexRDD/Graph/... Arrays or Lists or what, or do I even need to know/care?  

The vertex values are internally stored in hash tables within each partition 
(see VertexPartitionBase if you're curious) but to access them all from the 
REPL, you can just use RDD#collect as in your first mail. If you want just the 
vertex ids, you can use RDD#map first:

    val verts: VertexRDD[Int] = ...
    val pairs: Array[(VertexId, Int)] = verts.collect()
    val ids: Array[VertexId] = verts.map(kv => kv._1).collect()

Ankur

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to