Hello all,
We're trying to find a way to migrate our graph from one instance of Titan to another. Since our graph is pretty small at this point and downtime is acceptable, I was thinking I could use GraphML for this. I've successfully exported the graph using the below method, but I'm having trouble with import.
Here is my gremlin script (pretty straightforward, according to the tinkerpop docs
here):
Export:
g = TitanFactory.open('/opt/titan/conf/titan-cassandra-es.properties')
out = new FileOutputStream("titan-graph.graphml")
GraphMLWriter.outputGraph(g, out)
This outputs a GraphML file just fine (at least, it doesn't print any errors to the console and it looks like an XML file).
Import:
g = TitanFactory.open('/opt/titan/conf/titan-cassandra-es.properties')
in_stream = new FileInputStream("titan-graph.graphml")
GraphMLReader.inputGraph(g, in_stream)
When I try to run the above script to import, however, I get the following error message:
Key with given name does not exist
Immediately before import I am doing a titan.sh clean, so all data is being removed. Is there something else I need to do?
I'd also be interested in better ways to do this -- especially ones that are more scaleable.
Thanks in advance,
Kevin