It seems that the unique id for vertices is community_id in DSE Graph.
I have found that this works (id is long) :
v = g.V().has("VertexLabel","community_id",id).next()
none of those work:
v = g.V("community_id",id).next()
v = g.V("community_id","VertexLabel:"+id).next()
v = g.V(id).next()
v = g.V().hasId(id).next()
v = g.V().hasId("VertexLabel:"+id).next()
v = g.V("VertexLabel:"+id).next()
Edit
After some investigation I found that for a vertex v, v.id() returns a LinkedHashMap:
Vertex v = gT.next();
Object id = v.id();
System.out.println(id);
System.out.println(id.getClass());
System.out.println(g.V().hasId(id).next());
System.out.println(g.V(id).next());
The above prints:
{~label=User, community_id=1488246528, member_id=512}
class java.util.LinkedHashMap
v[{~label=User, community_id=1488246528, member_id=512}]
v[{~label=User, community_id=1488246528, member_id=512}]
There should be a more concise way ... any help is appreciated :)
Actually I found it:
ids can be written in this String form:
"vertexLabel:community_id:member_id"
So for the example above
id="User:1488246528:512"
:returns the specific Vertex
Till now I don't know of a good way how to print concisely the id (as a string) of a Vertex so it can be used in V() or in hasId() .. what I currently do is: