JanusGraph 与 Solr
JanusGraph with Solr
我在连接到 Solr 的 JanusGraph 时遇到问题:我有以下问题:
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
# 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
我收到以下错误:
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 class。任何帮助将不胜感激
在 cassandra 上启用节俭服务器
nodetool enablethrift
从
更改您的存储后端配置
storage.backend=cassandrathrift
至:
storage.backend=cql
我在连接到 Solr 的 JanusGraph 时遇到问题:我有以下问题:
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
# 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
我收到以下错误:
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 class。任何帮助将不胜感激
在 cassandra 上启用节俭服务器
nodetool enablethrift
从
更改您的存储后端配置storage.backend=cassandrathrift
至:
storage.backend=cql