Ah, but you won't have a graph with more than 2^64 (over 18 quintillion) vertices anyways, so it actually *is* practical to construct such a mapping to longs.
On Sun, Feb 23, 2014 at 7:26 PM, Josh Rosen <rosenvi...@gmail.com> wrote: > I think UUIDs contain 128 bits of information, so I don't think you can > store them in Java Longs. > > > On Sun, Feb 23, 2014 at 7:14 PM, Evan Sparks <evan.spa...@gmail.com>wrote: > >> How about generating Map[UUID,Long] and one in reverse, then use that map >> to replace your userids with the vertex IDs that graphx expects, and then >> reverse this process when presenting results? You could probably even do >> this with implicits and keep it fairly low overhead from a code perspective. >> >> > On Feb 23, 2014, at 6:39 PM, Deepak Nulu <deepakn...@gmail.com> wrote: >> > >> > Hi, >> > >> > I am new to Spark and GraphX (I have read the documentation and tried >> out >> > basic Spark examples). >> > >> > I am interested in using GraphX to process some data in my DB. I use >> UUIDs >> > to identify my data, but I see that GraphX uses Long to identify the >> > vertices (VertexId is defined to be of type Long). >> > >> > I can redefine VertexId to be java.util.UUID and see if it compiles and >> > continues to work, but I am concerned that this may not work in future >> > releases even if it works now. >> > >> > I did not want to log an enhancement ticket for this without first >> asking >> > about this on the mailing list. Also, I was not sure if this should be >> on >> > the developer list (most of the posts I saw on that list were related to >> > pull-requests). >> > >> > I skipped the Bagel documentation since it said it was being replaced >> with >> > GraphX. I could be wrong, but a brief scan of Bagel documentation gave >> me >> > the impression that I might be able to use Bagel with UUID identifiers. >> So >> > if GraphX is considered a replacement for Bagel, I am hoping UUIDs will >> be >> > supported in GraphX. Maybe the Graph can be parameterized with the type >> of >> > the vertex-ID? >> > >> > Any thoughts on how I should proceed? Is this of interest to anyone >> else? >> > >> > Thanks. >> > >> > -deepak >> > >> > >> > >> > >> > -- >> > View this message in context: >> http://apache-spark-user-list.1001560.n3.nabble.com/GraphX-with-UUID-vertex-IDs-instead-of-Long-tp1953.html >> > Sent from the Apache Spark User List mailing list archive at Nabble.com. >> > >