ShiftLeftSecurity / tinkergraph-gremlin

Apache License 2.0
38 stars 12 forks source link

Usage of UUID VertexIDManager #49

Open osmanscam opened 5 years ago

osmanscam commented 5 years ago

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.

mpollmeier commented 5 years ago

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.