I'm experimenting with TitanDB (with Cassandra as storage) + Rexter.

I've been reading the documentation during hours and trying to create multiple graph DBs on the same machine, but I didn't find the way to do it.

I find two main problems:

  • In the TitanDB docs, the Cassandra section tells how to create a graph on Cassandra, but the only parameters they comment are the host and the port, there isn't any reference to the graph name :s).
  • In the Rexter section we have essentially the same problem. We can define a list of named graphs, but every graph only can be mapped to a 3-tuple (backend type, host, and port).

The only way I can imagine is to instantiate more than one Cassandra server, and make that each Cassandra server listens to a different port. Then, configure Rexter to map every graph to a different cassandra instance.

There is a way to create more than one graph using the same Cassandra instance?


I had the same problem and, based on smurty's answer, I managed to do it by adding a new property 'storage.cassandra.keyspace' for each declared graph in rexster-cassandra-es.xml configuration file.

Since I'm using version 0.5.4 with default Cassandra+ElasticSearch configuration, this is the documentation that helped me.

Now I have one graph using the keyspace 'titan' (default value), and another one with the exact same configuration except for that property, which has value 'global'. In folder '$TITAN_HOME/db/cassandra/data' there are two folders, 'titan' and 'global', one for each graph's data.

  • After creating graph like mentioned above, how can we access the other graph with gremlin rest client? – Ank Dec 19 '17 at 12:12

See https://github.com/thinkaurelius/titan/wiki/Using-Cassandra scroll down to "Cassandra Specific Configuration", and use property "storage.keyspace=" to use multiple keyspaces in cassandra. Each keyspace will hold a graph. (default keyspace is 'titan'.

So, if you want 3 graphs, create 3 config files, with diff "storage.keyspace" property.

When you open a graph from your client using TitanFactory.open(config), use the appropriate config file.


There is a way to create more than one graph using the same Cassandra instance?

This useful tutorial is about precisely that:

  1. Define each Titan graph storage and indexing backends
  2. Configure Gremlin Server to initialize the graphs at launch
  3. Reference each graph Traversal object in the Gremlin Server .groovy bootstrap script

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.