2017-07-19 107 views
0

我是泰坦新手。我想用cassandra数据库使用泰坦。但是,当我开始小鬼服务器,并尝试加载图形使用命令 -与泰坦连接cassandra

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

它给了我下面的错误 -

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

我不想使用弹性搜索。任何人都可以帮忙

回答

1

您可能试图连接到之前配置为使用Elasticsearch的现有图形。默认情况下,密钥空间被命名为titan

1)你可以通过更新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连接到一个不同的密钥空间),你可以删除现有的密钥空间。如果您使用的快速启动方向bin/titan.sh start(这将启动一个节点卡桑德拉和单个节点Elasticsearch),

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

或者,如果你有一个独立的卡桑德拉安装:

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

然后,你会能够与默认的conf/titan-cassandra.properties连接。