JanusGraph 安装
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                JanusGraph 安装
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                下載地址:https://github.com/JanusGraph/janusgraph/releases/
版本:Version 0.3.2 (June 16, 2019)
安裝
解壓?janusgraph-0.3.2-hadoop2.zip?文件
janusgraph單機版安裝
注:本次安裝janusgraph基于es和hbse,所以先安裝es和hbase
1.安裝jdk
2.安裝janusgraph
unzip janusgraph-0.3.2-hadoop2.zip3.配置啟動配置文件conf/gremlin-server/gremlin-server.yaml
# Copyright 2019 JanusGraph Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.host: 192.168.2.116 port: 8182 scriptEvaluationTimeout: 30000 channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer graphs: {graph: conf/gremlin-server/janusgraph-hbase-solr.properties } scriptEngines: {gremlin-groovy: {plugins: { org.janusgraph.graphdb.tinkerpop.plugin.JanusGraphGremlinPlugin: {},org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin: {},org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math], methodImports: [java.lang.Math#*]},org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample.groovy]}}}} serializers:- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { serializeResultToString: true }}- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}# Older serialization versions for backwards compatibility:- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0, config: {ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true }}- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }} processors:- { className: org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor, config: { sessionTimeout: 28800000 }}- { className: org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor, config: { cacheExpirationTime: 600000, cacheMaxSize: 1000 }} metrics: {consoleReporter: {enabled: true, interval: 180000},csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},jmxReporter: {enabled: true},slf4jReporter: {enabled: true, interval: 180000},gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},graphiteReporter: {enabled: false, interval: 180000}} maxInitialLineLength: 4096 maxHeaderSize: 8192 maxChunkSize: 8192 maxContentLength: 65536 maxAccumulationBufferComponents: 1024 resultIterationBatchSize: 64 writeBufferLowWaterMark: 32768 writeBufferHighWaterMark: 65536?
4.配置啟動配置文件conf/gremlin-server/janusgraph-hbase-solr.properties
# functionality. This setting is optional. JanusGraph can use multiple # heterogeneous index backends. Hence, this option can appear more than # once, so long as the user-defined name between "index" and "backend" is # unique among appearances.Similar to the storage backend, this should be # set to one of JanusGraph's built-in shorthand names for its standard # index backends (shorthands: lucene, elasticsearch, es, solr) or to the # full package and classname of a custom/third-party IndexProvider # implementation. # # Default: elasticsearch # Data Type: String # Mutability: GLOBAL_OFFLINE # # Settings with mutability GLOBAL_OFFLINE are centrally managed in # JanusGraph's storage backend. After starting the database for the first # time, this file's copy of this setting is ignored. Use JanusGraph's # Management System to read or modify this value after bootstrapping. index.search.backend=solr gremlin.graph=org.janusgraph.core.JanusGraphFactory # The operation mode for Solr which is either via HTTP (`http`) or using # SolrCloud (`cloud`) # # Default: cloud # Data Type: String # Mutability: GLOBAL_OFFLINE # # Settings with mutability GLOBAL_OFFLINE are centrally managed in # JanusGraph's storage backend. After starting the database for the first # time, this file's copy of this setting is ignored. Use JanusGraph's # Management System to read or modify this value after bootstrapping. index.search.solr.mode=http# List of URLs to use to connect to Solr Servers (LBHttpSolrClient is # used), don't add core or collection name to the URL. # # Default: http://localhost:8983/solr # Data Type: class java.lang.String[] # Mutability: MASKABLE index.search.solr.http-urls=http://192.168.2.116:8983/solr index.search.solr.mode=cloud index.search.solr.zookeeper-ur=192.168.2.116:2181/solr index.search.solr.configset=janusgraph?janusgraph-hbase-solr.properties?配置文件說明:
storage.backend=hbase //使用HBase作為存儲后端 storage.hostname=zookeeper-host1,zookeeper-host2,zookeeper-host3 //HBase的Zookeeper storage.hbase.table=janusgraph//HBase存儲JanusGraph元數據的表名 storage.hbase.ext.zookeeper.znode.parent=/hbase //HBase使用的Znode storage.hbase.ext.hbase.zookeeper.property.clientPort=2181 //端口HBase的查詢是基于Rowkey,所以在條件查詢這塊是弱項,一旦Rowkey確定如果有新的查詢就比較難。所以為了解決這個問題,JanusGraph引入了索引后端,下面我們介紹下如何配置Solr作為JanusGraph的索引后端。配置文件conf/janusgraph-hbase-solr.properties配置參數如下:index.search.backend=solr //使用solr作為索引后端 index.search.solr.mode=cloud //solr使用集群模式 index.search.solr.zookeeper-url=zookeeper-host1:2181/solr,zookeeper- host2:2181/solr,zookeeper-host3:2181/solr //HBase使用的Zookeeper index.search.solr.configset=janusgraph //Solr使用HBase的元數據表名?
5.啟動服務
nohup bin/gremlin-server.sh ?>log.log &?
總結
以上是生活随笔為你收集整理的JanusGraph 安装的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: cuda的shared momery
- 下一篇: C++读写锁
