用泰坦连接到cassandra

时间:2017-07-19 10:16:20

标签: cassandra gremlin titan

我是泰坦的新手。我想用cassandra数据库使用titan。但是当我启动gremlin服务器并尝试使用命令加载图形时 -

http://example.com

它给了我以下错误 -

//example.com

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

1 个答案:

答案 0 :(得分: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连接。