Reputation: 177
I'm trying to load the example Graph of the Gods file that is distributed with Titan with the loadGraphSON function. I have executed the following steps and are working with Titan 0.5.4 with Hadoop 2.
bin/titan.sh -c cassandra-es start
bin/gremlin.sh
g = TitanFactory.open('conf/titan-cassandra-es.properties')
g.loadGraphSON("examples/graph-of-the-gods")
I do not get an error, but trying to show all vertices with g.V returns nothing. Am I executing the rights steps here, or am I doing something wrong?
Upvotes: 1
Views: 2001
Reputation: 857
If you're not setting up a Titan Hadoop job, you could try using the Blueprints GraphSON reader to load graph data. See https://github.com/tinkerpop/blueprints/wiki/GraphSON-Reader-and-Writer-Library
In a Gremlin shell it looks a bit like this:
inStream = new FileInputStream("../examples/graph-of-the-gods.json")
GraphSONReader.inputGraph(g, inStream)
Upvotes: 0
Reputation: 46226
Note that this question was answered on the Aurelius Graphs Mailing List:
https://groups.google.com/d/msg/aureliusgraphs/FiCvX891r6g/BkmWj3xc3ikJ
Basically:
1) the filename should be examples/graph-of-the-gods.json
2) you can also use GraphOfTheGodsFactory.load(g) which will also create indexes and type definitions
I'd say the second point above would be the preferred manner in which to load Graph of the Gods.
Upvotes: 0