【问题标题】:Connecting to cassandra with titan使用 Titan 连接到 cassandra
【发布时间】:2017-07-19 10:16:20
【问题描述】:
我是泰坦的新手。我想将泰坦与 cassandra 数据库一起使用。但是当我启动 gremlin 服务器并尝试使用命令加载图形时 -
graph = TitanFactory.open("conf/titan-cassandra.properties")
它给了我以下错误 -
Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex
我不想使用弹性搜索。谁能帮忙。
【问题讨论】:
标签:
cassandra
gremlin
titan
【解决方案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) 您可以删除现有的键空间。如果您从快速入门说明(启动单节点 Cassandra 和单节点 Elasticsearch)中使用了 bin/titan.sh start,
cd $TITAN_HOME
bin/titan.sh stop
rm -rf db/* logs/*
bin/titan.sh start
或者,如果您有独立的 Cassandra 安装:
cd $CASSANDRA_HOME
bin/cqlsh -e 'drop keyspace if exists titan'
然后你就可以连接到默认的conf/titan-cassandra.properties。