How to delete graph in Titan with Cassandra storage backend?

前端 未结 4 1176
醉话见心
醉话见心 2021-02-14 19:24

I use Titan 0.4.0 All, running Rexster in shared VM mode on Ubuntu 12.04.

How could I properly delete a graph in Titan which is using the Cassandra storage backend?

4条回答
  •  北海茫月
    2021-02-14 19:51

    As was mentioned in one of the comments to the earlier answer DROPping a keyspace titan using cqlsh should do it:

    cqlsh> DROP KEYSPACE titan;
    

    The name of the keyspace Titan uses is set up using storage.cassandra.keyspace configuration option. You can change it to whatever name you want and is acceptable by Cassandra.

    storage.cassandra.keyspace=hello_titan
    

    When Cassandra is getting up, it prints out the keyspace's name as follows:

    INFO 19:50:32 Create new Keyspace: KSMetaData{name=hello_titan, strategyClass=SimpleStrategy, strategyOptions={replication_factor=1}, cfMetaData={}, durableWrites=true, userTypes=org.apache.cassandra.config.UTMetaData@767d6a9f}

    In 0.9.0-M1, the name appears in Titan's log in DEBUG (set log4j.rootLogger=DEBUG, stdout in conf/log4j-server.properties):

    [DEBUG] AstyanaxStoreManager - Found keyspace titan
    

    or the following when it doesn't:

    [DEBUG] AstyanaxStoreManager - Creating keyspace titan...
    [DEBUG] AstyanaxStoreManager - Created keyspace titan
    

提交回复
热议问题