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.zip

3.配置启动配置文件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 &

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/509802.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

java中枚举类型详解

枚举类型的引入: 枚举是从java5开始提供的一种新的数据类型,是一个特殊的类,就是固定的多个常量对象的集合。 定义格式: [修饰]enum 枚举类名 { 常量A,常量B,常量C; } 代码: package com.test;enum Weekday {…

Hbase 预写日志WAL处理源码分析之 LogCleaner

目录 Hlog WALs和oldWALs 整体流程 HMaster 初始化 定时执行 LogCleaner 日志清理类 ReplicationLogCleaner 日志清理类 总结 Hlog WALs和oldWALs 这里先介绍一下Hlog失效和Hlog删除的规则 HLog失效:写入数据一旦从MemStore中刷新到磁盘,…

开发者都应该使用的10个C++11特性

摘要 在C11新标准中,语言本身和标准库都增加了很多新内容,本文只涉及了一些皮毛。不过我相信这些新特性当中有一些,应该成为所有C开发者的常规装备。你也许看到过许多类似介绍各种C11特性的文章。下面是我总结的,C开发者都需要学习…

Java8新特性:CompletableFuture 方法介绍

目录 1. runAsync 和 supplyAsync方法 2. whenComplete、whenCompleteAsync、exceptionally 3. thenApply 、 handle thenApply handle 4.thenAccept 、thenRun 方法 消费处理结果 thenAccept thenRun 5. thenCombine 、 thenAcceptBoth thenCombine thenAcceptBot…

Java 8 CompletableFuture 教程

Java 8 有大量的新特性和增强如 Lambda 表达式,Streams,CompletableFuture等。在本篇文章中我将详细解释清楚CompletableFuture以及它所有方法的使用。 什么是CompletableFuture? 在Java中CompletableFuture用于异步编程,异步编…

Dubbo 2.7.x admin 控制台管理提示 : 无元数据信息,请升级至Dubbo2.7及以上版本

版本:2.7.3 安装完Dubbo admin 运行后,查询服务提示 无元数据信息,请升级至Dubbo2.7及以上版本,或者查看application.properties中关于config center的配置,详见 这里 这里描述着处理方法:https://github…

Unity在运行时(代码中)设置材质的渲染模式(RenderingMode)

在Unity中,有些少数情况下我们需要用代码来创建材质。比如说在材质非常多,而仅仅是纹理不一样的时候。 而用代码创建的材质是没有对应的资源文件的,我们也就无法使用Inspector来设置它的Rendering Mode。 关于Rendering Mode,许我…

java中String与new String的区别

String类:表示不可改变的字符串,当前对象创建完毕之后,该对象的内容(字符序列)是不能改变的,一旦内容改变就是一个新的对象。 String对象的创建: 1):直接赋一个字面量&a…

Yarn 监控 - 监控任务运行状态 (包括Spark,MR 所有在Yarn中运行的任务)

目录 Maven pom引用 配置文件 代码 平时开发中可以在yarn的web页面查看应用程序运行状态&#xff0c;如下图 下面代码实现了&#xff0c;代码监控Yarn运行程序&#xff0c;可以对部分任务进行实时监控 Maven pom引用 这里Demo使用的hadoop版本是 3.0.0 <dependency>…

Behavior Designer

https://my.oschina.net/acitiviti/blog/621627

java中常用的String方法

package com.test;import java.io.Console; import java.util.Arrays; import java.util.Scanner;public class Main {public static void main(String[] agrs){char[] cs new char[]{A, b, c};String str1 new String(cs);System.out.println("-------------变成哈希值…

HugeGraph 图数据库索引介绍 - 范围索引,全文索引

目录 HugeGraph 索引介绍 二级索引 组合索引 范围索引 全文索引 HugeGraph 索引介绍 二级索引 创建schema和添加数据 schema.propertyKey("name").asText().ifNotExist().create();schema.propertyKey("uid").asLong().ifNotExist().create();schem…

谷歌c++风格摘抄

全部来源于网络&#xff0c;我感觉好的就复制粘贴了。【你必需防止头文件重复编译。】<PROJECT>_<PATH>_<FILE>_H_foo/src/bar/baz.h > #ifndef FOO_BAR_BAZ_H_【inline函数要尽量简单。】函数最好小于10行。函数内包含循环、switch语句&#xff0c;不能定…

HugeGraph 图数据库常见问题汇总

索引介绍&#xff1a;https://blog.csdn.net/it1993/article/details/89492296 分词问题&#xff1a;https://github.com/hugegraph/hugegraph/issues/779 Hugegraph是否支持外部索引&#xff1a;https://github.com/hugegraph/hugegraph/issues/542 Hugegraph二级索引进行模…

String练习代码保存

package com.test;public class M1001{public static void main(String[] args) {System.out.println("-----------字符串截取----------------");String str "a,b,c,d,e,,";String[] str1 null;str1str.split(",");for(String st : str1){Sys…

Hbase JMX 监控 - Region

获取Region监控信息页面&#xff1a; http://regionServerName:16030/jmx?qryHadoop:serviceHBase,nameRegionServer,subRegions 获得数据如下 参数代表含义 *** 为前缀代表&#xff1a;Namespace_${namespace}_table_${tableName}_region_${regionName} ***_metric_storeCo…

String、StringBuilder和StringBuffer的区别和用法

分别使用使用这三种来拼接字符串&#xff0c;对比各自损耗的时间&#xff1a; 经过测试&#xff1a; package com.test;public class Main{public static void main(String[] args){testString();testStringBuffer();testStringBuilder();}private static void testStringBui…

Hbase Compaction 源码分析 - CompactionChecker

其他相关文章 Hbase Compaction 源码分析 - CompactionChecker Hbase Compaction 源码分析 - RatioBasedCompactionPolicy 策略 Hbase Compaction 源码分析 - CompactSplitThread 线程池选择 CompactionChecker 介绍&#xff1a; RegionServer会在后台启动一个线程Compac…

c++ 之类的前置声明

转自&#xff1a;http://blog.csdn.net/fjb2080/archive/2010/04/27/5533514.aspx 作者&#xff1a;清林&#xff0c;博客名&#xff1a;飞空静渡 刚开始学习c的人都会遇到这样的问题&#xff1a; 定义一个类 class A&#xff0c;这个类里面使用了类B的对象b&#xff0c;然后定…