Date
1 - 7 of 7
Edge id is different between gremlin console and vertex program
Saloni Agarwal <saloniag...@...>
Hi, I'm using jansugraph with Cassandra + ES combination and doing data ingestion with OLAP mode using the vertex program. Edge id which I'm getting from gremlin console is different from value coming from the vertex program. Edge id from gremlin console - gremlin> g.E() ==>e[42bn5v-215tzs-ro5-2pjr34][122884120-Identity->163844320] Edge id from vertex program - @Override public void execute(final Vertex vertex, final Messenger<Object> messenger, final Memory memory) { Iterator<Edge> edgeIterator = vertex.edges(Direction.BOTH); while (edgeIterator.hasNext()) { Edge edge = edgeIterator.next(); logger.info("edge_id = {}", edge.id().toString()); } } edge_id = 245767171 How can I get the same values from both places? |
|
HadoopMarc <bi...@...>
Try this: g.E().next().id().getRelationId() Best wishes, Marc Op vrijdag 21 augustus 2020 om 16:28:21 UTC+2 schreef salo...@...:
|
|
Saloni Agarwal <saloniag...@...>
Thanks Marc !!
toggle quoted message
Show quoted text
On Sunday, August 23, 2020 at 2:07:58 PM UTC+5:30 HadoopMarc wrote:
|
|
Saloni Agarwal <saloniag...@...>
though I wanted to know, is there a way to get edge id rather than relationid from vertex program? On Mon, Aug 24, 2020 at 1:29 PM Saloni Agarwal <saloniag...@...> wrote: Thanks Marc !! |
|
HadoopMarc <bi...@...>
Without repeating your experiment I do not understand how the edge.id().toString() logging can result in a single number. Can you also log the edge.id().getClass() ? I would expect the edge.id() to be an instance of: https://github.com/JanusGraph/janusgraph/blob/v0.5.2/janusgraph-driver/src/main/java/org/janusgraph/graphdb/relations/RelationIdentifier.java (as it is for OLTP g.E().next().id().getClass()) HTH, Marc Op maandag 24 augustus 2020 om 13:09:26 UTC+2 schreef salo...@...:
|
|
HadoopMarc <bi...@...>
See my answer to the parallel thread on this forum: https://groups.google.com/g/janusgraph-users/c/9nfJVk0t9WM
toggle quoted message
Show quoted text
Op maandag 24 augustus 2020 om 15:48:23 UTC+2 schreef HadoopMarc:
|
|
Saloni Agarwal <saloniag...@...>
Thanks Marc, for the above thread. It was helpful.
toggle quoted message
Show quoted text
regards, Saloni On Wednesday, August 26, 2020 at 12:37:53 AM UTC+5:30 HadoopMarc wrote: See my answer to the parallel thread on this forum: https://groups.google.com/g/janusgraph-users/c/9nfJVk0t9WM |
|