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...@...:

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?


Saloni Agarwal <saloniag...@...>
 

Thanks Marc !!

On Sunday, August 23, 2020 at 2:07:58 PM UTC+5:30 HadoopMarc wrote:
Try this:

g.E().next().id().getRelationId()

Best wishes,

Marc

Op vrijdag 21 augustus 2020 om 16:28:21 UTC+2 schreef salo...@...:
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?


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 !!
On Sunday, August 23, 2020 at 2:07:58 PM UTC+5:30 HadoopMarc wrote:
Try this:

g.E().next().id().getRelationId()

Best wishes,

Marc

Op vrijdag 21 augustus 2020 om 16:28:21 UTC+2 schreef salo...@...:
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?

--
You received this message because you are subscribed to a topic in the Google Groups "JanusGraph users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/janusgraph-users/k578ktX_m5Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/58c147c4-277e-4d5b-bd9a-590d4ddb0ff4n%40googlegroups.com.


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...@...:

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 <salo...@...> wrote:
Thanks Marc !!
On Sunday, August 23, 2020 at 2:07:58 PM UTC+5:30 HadoopMarc wrote:
Try this:

g.E().next().id().getRelationId()

Best wishes,

Marc

Op vrijdag 21 augustus 2020 om 16:28:21 UTC+2 schreef salo...@...:
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?

--
You received this message because you are subscribed to a topic in the Google Groups "JanusGraph users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/janusgraph-users/k578ktX_m5Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to janusgr...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/58c147c4-277e-4d5b-bd9a-590d4ddb0ff4n%40googlegroups.com.


HadoopMarc <bi...@...>
 

See my answer to the parallel thread on this forum: https://groups.google.com/g/janusgraph-users/c/9nfJVk0t9WM

Op maandag 24 augustus 2020 om 15:48:23 UTC+2 schreef HadoopMarc:

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:


(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...@...:
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 <salo...@...> wrote:
Thanks Marc !!
On Sunday, August 23, 2020 at 2:07:58 PM UTC+5:30 HadoopMarc wrote:
Try this:

g.E().next().id().getRelationId()

Best wishes,

Marc

Op vrijdag 21 augustus 2020 om 16:28:21 UTC+2 schreef salo...@...:
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?

--
You received this message because you are subscribed to a topic in the Google Groups "JanusGraph users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/janusgraph-users/k578ktX_m5Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to janusgr...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/58c147c4-277e-4d5b-bd9a-590d4ddb0ff4n%40googlegroups.com.


Saloni Agarwal <saloniag...@...>
 

Thanks Marc, for the above thread. It was helpful.

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

Op maandag 24 augustus 2020 om 15:48:23 UTC+2 schreef HadoopMarc:
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:


(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...@...:
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 <salo...@...> wrote:
Thanks Marc !!
On Sunday, August 23, 2020 at 2:07:58 PM UTC+5:30 HadoopMarc wrote:
Try this:

g.E().next().id().getRelationId()

Best wishes,

Marc

Op vrijdag 21 augustus 2020 om 16:28:21 UTC+2 schreef salo...@...:
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?

--
You received this message because you are subscribed to a topic in the Google Groups "JanusGraph users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/janusgraph-users/k578ktX_m5Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to janusgr...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/58c147c4-277e-4d5b-bd9a-590d4ddb0ff4n%40googlegroups.com.