JanusGraph

Setting up JanusGraph i noticed the following in the console:

09:04:12,175  INFO ReflectiveConfigOptionLoader:173 - Loaded and initialized config classes: 10 OK out of 12 attempts in PT0.023S
09:04:12,230  INFO Reflections:224 - Reflections took 28 ms to scan 1 urls, producing 2 keys and 2 values 
09:04:12,291  WARN GraphDatabaseConfiguration:1445 - Local setting index.search.index-name=entity (Type: GLOBAL_OFFLINE) is overridden by globally managed value (janusgraph).  Use the ManagementSystem interface instead of the local configuration to control this setting.
09:04:12,294  WARN GraphDatabaseConfiguration:1445 - Local setting index.search.backend=solr (Type: GLOBAL_OFFLINE) is overridden by globally managed value (elasticsearch).  Use the ManagementSystem interface instead of the local configuration to control this setting.
09:04:12,300  INFO CassandraThriftStoreManager:628 - Closed Thrift connection pooler.

and then i see the following:

Exception in thread "main" java.lang.IllegalArgumentException: Could not instantiate implementation: org.janusgraph.diskstorage.es.ElasticSearchIndex

How do i stop using elasticsearch and switch to Solr?

My properties file is as follows:

index.search.backend=solr
index.search.directory=/path/to/directory/for/solr/index/something
index.search.index-name=something
index.search.solr.mode=http
index.search.solr.http-urls=http://127.0.0.1:8983/solr
storage.backend=cassandrathrift

storage.hostname=127.0.0.1
cache.db-cache = true

cache.db-cache-clean-wait = 20

cache.db-cache-time = 180000

cache.db-cache-size = 0.25

solr janusgraph

shareimprove this question

asked Oct 3 '17 at 13:20

BigBug

3,2151717 gold badges7171 silver badges120120 bronze badges

  • Once a GLOBAL_OFFLINE property is set and the janusgraph cluster is initialized, any changes to those properties will never take effect in that cluster, even if the cluster were to be restarted. So even if you change index backend to solr, it will not take effect, so you have to clear the existing data and restart the janusgraph – Ashraful Islam Oct 3 '17 at 18:48 

  • currently there is no data. i see nothing in my solr.... :( which data am i supposed to delete? – BigBug Oct 3 '17 at 21:31

  • 1

    JanusGraph store config in your storage backend in your case cassandra. you need to clear cassandra data – Ashraful Islam Oct 4 '17 at 4:03

add a comment

1 Answer

activeoldestvotes

3

 

The answer to this basically the same as this one for Titan. JanusGraph was forked from Titan.

You are probably trying to connect to an existing graph that was previously configured to use Elasticsearch. By default, the keyspace is named janusgraph.

1) You could connect to a different keyspace by updating conf/janusgraph-cassandra.properties

gremlin.graph=org.janusgraph.core.JanusGraphFactory
storage.backend=cassandrathrift
storage.hostname=127.0.0.1
storage.cassandra.keyspace=mygraph

2) You could drop the existing keyspace. If you used bin/janusgraph.sh start from the quick start directions (which starts a single node Cassandra and a single node Elasticsearch),

bin/janusgraph.sh clean

Or if you have a standalone Cassandra installation:

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

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

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值