December 21, 2012

Titan with Cassandra

In a previous blog post about Titan I mentioned about Titan supports three different storage back ends. For this you need Titan and Cassandra both.
Then extract Cassandra and Titan both into a folder and take a terminal or a command prompt. Go to Cassandra bin and run cassandra.bat or cassandra. Before this you have to set JAVA_HOME.

Linux:
bash cassandra

Windows:
cassandra.bat

Then take gremlin from titan bin.

Linux:
bash gremlin.sh
Windows:
gremlin.bat
Then you have to configure storage backend. for that use following commands on gremlin.

cnf = new BaseConfiguration();
cnf.setProperty('storage.backend','cassandra');
cnf.setProperty('storage.hostname','127.0.0.1');
g = TitanFactory.open(cnf);
Now rest is your graph database experience!!!

No comments:

Post a Comment