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.ElasticSearchIndexHow 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.25solr 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
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=mygraph2) 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 cleanOr 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.