以前文章说了一下JanusGraph使用Hbase+ES的配置(传送门),今天对Hbase+Solr进行一下配置,已测试经过。node
先是以前遇到过的异常,NoNodeException: KeeperErrorCode = NoNode for /hbase/hbaseid bash
# 不用改的
storage.backend=hbase
index.search.backend=solr
cache.db-cache = true
cache.db-cache-clean-wait = 20
cache.db-cache-time = 180000
cache.db-cache-size = 0.5
# 酌情改为本身集群的
storage.hostname=manager.big.com,master.big.com,worker.big.com
index.search.solr.zookeeper-url=zk1:2181/solr,zk2:2181/solr,zk3:2181/solr
index.search.solr.http-urls=http://manager.big.com:8983/solr
index.search.solr.configset=graph_core #注意,要预先在Solr中建立!
storage.hbase.table=janusgraph_solr
# 踩过坑的
index.search.solr.mode=cloud
storage.hbase.ext.zookeeper.znode.parent=/hbase-unsecure #注意,这是小坎坷说的问题要改的配置
gremlin.graph=org.janusgraph.core.JanusGraphFactory
复制代码
以上配置,使用以下测试:oop
./bin/gremlin
gremlin> graph = JanusGraphFactory.open('path_to/janusgraph-0.4.0-hadoop2/conf/janusgraph-hbase-solr.properties')
复制代码
打印出==>standardjanusgraph[hbase:[……]]
之类的就能够了。post