Connecting to cassandra with titan

帅比萌擦擦* 提交于 2019-12-11 06:25:02

问题


I am new to titan. I want to use titan with cassandra database. But when I start the gremlin server and try to load a graph using command -

graph = TitanFactory.open("conf/titan-cassandra.properties")

it gives me the following error -

Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex

I dont want to use elastic search. Can anyone help.


回答1:


You are probably trying to connect to an existing graph that was previously configured to use Elasticsearch. By default, the keyspace is named titan.

1) You could connect to a different keyspace by updating conf/titan-cassandra.properties

gremlin.graph=com.thinkaurelius.titan.core.TitanFactory
storage.backend=cassandrathrift
storage.hostname=127.0.0.1
storage.cassandra.keyspace=mygraph

2) You could drop the existing keyspace. If you used bin/titan.sh start from the quick start directions (which starts a single node Cassandra and a single node Elasticsearch),

cd $TITAN_HOME
bin/titan.sh stop
rm -rf db/* logs/*
bin/titan.sh start 

Or if you have a standalone Cassandra installation:

cd $CASSANDRA_HOME
bin/cqlsh -e 'drop keyspace if exists titan'

Then you would be able to connect with the default conf/titan-cassandra.properties.



来源:https://stackoverflow.com/questions/45187554/connecting-to-cassandra-with-titan

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!