tinkergraph-gremlin icon indicating copy to clipboard operation
tinkergraph-gremlin copied to clipboard

Usage of UUID VertexIDManager

Open osmanscam opened this issue 6 years ago • 1 comments

Hi;

When I try this library with the GREMLIN_TINKERGRAPH_VERTEX_ID_MANAGER configuration via conf.setProperty(GREMLIN_TINKERGRAPH_VERTEX_ID_MANAGER, TinkerGraph.DefaultIdManager.UUID.name()); it has no effect,

I suppose it is because of the line 702 of https://github.com/ShiftLeftSecurity/tinkergraph-gremlin/blob/master/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java

In the original implementation this line reads the configuration, you may see here at line 523 https://github.com/apache/tinkerpop/blob/master/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java

Is there any way to set UUID as VertexIDManager?

Thanks, Regards.

osmanscam avatar Sep 03 '19 14:09 osmanscam

Your analysis is correct. In the successor of this, overflowdb, there's only long ids, and I kicked out UUIDs along the way, mostly to keep the implementation simple. See https://github.com/ShiftLeftSecurity/tinkergraph-gremlin#successor-notice-overflowdb

You could bring the UUID id manager back in, but you'd have to adapt quite a few places that currently assume long ids. The relevant tests (https://github.com/ShiftLeftSecurity/tinkergraph-gremlin/blob/master/.travis.yml#L15) can guide you. If they pass, I'm happy to merge a PR.

mpollmeier avatar Sep 03 '19 20:09 mpollmeier