Hello all,
I have been a fairly-long-time user of Tinkerpop 2, and am now getting into Tinkerpop 3 (congrats on Apache Incubator status btw!). I'm using 3.2.0-incubating.
My use case is this: I have a Java app (Apache NiFi) collecting graph data, let's say it's in Tinkerpop3 GraphSON format. I'd like to offer a service in NiFi for sending the vertices and edges from GraphSON into a Graph hosted on a different server (so, a RemoteGraph or using a RemoteConnection).
I have been prototyping in Groovy Console, to see how I could do it without the Gremlin shell, but I'm not having any luck being able to read a GraphSON doc into a RemoteGraph. When I try this:
graph = RemoteGraph.open('conf/remote-graph.properties')
graph.io(IoCore.graphson()).readGraph("data/tinkerpop-modern.json")
I get: "java.lang.UnsupportedOperationException: The default implementation is not capable of validating custom ids - please override". I see that RemoteGraph is not a full graph implementation, but was hoping to be able to do some custom conversions. Following the doc here:
I tried:
stream = new FileInputStream("data/tinkerpop-modern.json")
graph.io(IoCore.graphson()).reader().vertexIdKey("name").create().readGraph(stream, graph)
I get: "groovy.lang.MissingMethodException: No signature of method: org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONReader$Builder.vertexIdKey() is applicable for argument types: (java.lang.String) values: [name]". A quick look at GitHub returns no results for the vertexIdKey method, save for the docs themselves:
Do I need to do a manual graph copy, like reading the GraphSON into a TinkerGraph and then adding the elements (well, new elements with the same properties to avoid ID collisions) one by one via sending Traversals to the RemoteGraph?
Thank you in advance,
Matt