本文介绍了用titan连接到Cassandra的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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")

它给了我以下错误-

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

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

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

推荐答案

您可能正在尝试连接到先前配置为使用Elasticsearch的现有图形。默认情况下,键空间的名称为 titan

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)您可以通过更新<$连接到其他键空间c $ c> conf / titan-cassandra.properties

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)您可以删除现有的键空间。如果您从快速入门指南中使用 bin / titan.sh start (启动单个节点Cassandra和单个节点Elasticsearch),

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

或者如果您有独立的Cassandra安装:

Or if you have a standalone Cassandra installation:

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

然后,您将能够使用默认的 conf / titan-cassandra.properties

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

这篇关于用titan连接到Cassandra的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 14:56