0

I would like to drop everything from TitanDB.

This says that it's possible by removing all the vertices but I am failing to delete the graph with that recommended approach. I can't do g.V.remove() in java and when I delete each Vertex independently this only gets rid of the vertices but leaves behind the indexes.

Is there a way (from within java) of dropping everything ? I am essentially looking for the equivalent of using cqlsh and typing:

cqlsh> DROP KEYSPACE titan;
Community
  • 1
  • 1
Filipe Teixeira
  • 3,565
  • 1
  • 25
  • 45

2 Answers2

2

If you want to stick to the Titan tools, what about the TitanCleanup utility?

http://thinkaurelius.github.io/titan/javadoc/1.0.0/com/thinkaurelius/titan/core/util/TitanCleanup.html

Nuking the C* keyspace will certainly do the trick with great efficiency, though might leave external ("mixed") indexes stranded if you have them.

Sebastian Good
  • 6,310
  • 2
  • 33
  • 57
1

You could use the Cassandra Java driver to connect to Cassandra and drop the keyspace. Make sure to close the TitanGraph first.

Jason Plurad
  • 6,682
  • 2
  • 18
  • 37