注:本次安裝janusgraph基於es和hbse,所以先安裝es和hbase
1.安裝jdk
2.安裝janusgraph
-
unzip janusgraph-0.3.1-hadoop2.zip
-
配置啟動配置文件conf/gremlin-server/gremlin-server.yaml
//配置服務器websocket和http同時支持 channelizer: org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer //配置打開的圖指定的配置文件路徑 graph: conf/gremlin-server/janusgraph-hbase-es.properties maxInitialLineLength: 4096 maxHeaderSize: 8192 maxChunkSize: 8192 maxContentLength: 65536 maxAccumulationBufferComponents: 1024 resultIterationBatchSize: 64 writeBufferLowWaterMark: 32768 writeBufferHighWaterMark: 65536 // threadPoolWorker: 10 //線程池大小 gremlinPool: 10
-
配置啟動配置文件conf/gremlin-server/janusgraph-hbase-es.properties
//配置存儲后端為hbase storage.backend=hbase //配置hbase地址和端口(zookeeper) storage.hostname=192.168.130.212 storage.port=2181 //配置索引后端為es index.search.backend=elasticsearch //配置es路徑 index.search.hostname=192.168.130.213:9200 storage.index.search.client-only=true storage.index.search.local-mode=false storage.index.search.sniff=false //指定JanusGraphFactory gremlin.graph=org.janusgraph.core.JanusGraphFactory //打開允許批量導入 storage.batch-loading=true //強制使用索引 force-index=true //hbase上存圖的表名 storage.hbase.table=janusgraph
-
啟動:bin/gremlin-server.sh
3.參考資料
[1] http://janusgraph.org/ JanusGraph官方網址
[2] https://github.com/JanusGraph/janusgraph JanusGraph的github源碼網址
[3] https://docs.janusgraph.org/latest/index.html JanusGraph的官方文檔