首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >带Solr的JanusGraph

带Solr的JanusGraph
EN

Stack Overflow用户
提问于 2017-10-03 03:56:32
回答 2查看 422关注 0票数 2

我在连接到Solr的JanusGraph时遇到了问题:我有以下问题:

代码语言:javascript
复制
application.java
    public static void main(String args[]) {
        JanusGraph g = JanusGraphFactory.open("/path/to/file/janusgraph-solr.properties");
        GraphOfTheGodsFactory.load(g);
        g.close();
    }

janushgraph-solr.properties

代码语言:javascript
复制
# Change to the directory where JanusGraph was extracted.  Later commands
# use relative paths to the Solr config files shipped with the JanusGraph
# distribution.
cd $JANUSGRAPH_HOME

# The name must be URL safe and should contain one dot/full-stop
# character. The part of the name after the dot must not conflict with
# any of JanusGraph's internal CF names.  Starting the part after the dot
# "solr" will avoid a conflict with JanusGraph's internal CF names.
CORE_NAME=testt
# Where to upload collection configuration and send CoreAdmin requests.
SOLR_HOST=localhost:8983

# The value of index.[X].solr.http-urls in JanusGraph's config file
# should match $SOLR_HOST and $CORE_NAME.  For example, given the
# $CORE_NAME and $SOLR_HOST values above, JanusGraph's config file would
# contain (assuming "search" is the desired index alias):
#
 index.search.solr.http-urls=http://localhost:8983/solr/testt
#
# The stock JanusGraph config file conf/janusgraph-cassandra-solr.properties
# ships with this http-urls value.

storage.backend=cassandrathrift

GraphOfTheGods文件:https://github.com/JanusGraph/janusgraph/blob/master/janusgraph-core/src/main/java/org/janusgraph/example/GraphOfTheGodsFactory.java

我得到以下错误:

代码语言:javascript
复制
Exception in thread "main" java.lang.IllegalArgumentException: Could not instantiate implementation: org.janusgraph.diskstorage.cassandra.thrift.CassandraThriftStoreManager

Caused by: org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend

Caused by: java.net.ConnectException: Connection refused (Connection refused)

如何摆脱storage.backend=cassandrathrift并使用solr作为后端?如文件所示,用solr代替"cassandrathrift“对我来说是失败的。这将导致找不到solr类。如能提供任何帮助,将不胜感激。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-10-03 04:21:05

在cassandra上启用节俭服务器

代码语言:javascript
复制
nodetool enablethrift
票数 4
EN

Stack Overflow用户

发布于 2017-10-28 03:03:47

将存储后端配置更改为

代码语言:javascript
复制
storage.backend=cassandrathrift

至:

代码语言:javascript
复制
storage.backend=cql
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46536990

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档