HugeGraph 多图配置

多图配置

我们的系统是可以存在多个图的,并且各个图的后端可以不一样,比如图 hugegraph 和 hugegraph1,其中 hugegraph 以 cassandra 作为后端,hugegraph1 以 rocksdb作为后端。

配置方法也很简单:

修改 gremlin-server.yaml

在 gremlin-server.yaml 的 graphs 域中添加一个键值对,键为图的名字,值为图的配置文件路径,比如:

graphs: {
  hugegraph: conf/hugegraph.properties,
  hugegraph1: conf/hugegraph1.properties
}

修改 rest-server.properties

在 rest-server.properties 的 graphs 域中添加一个键值对,键为图的名字,值为图的配置文件路径,比如:

graphs=[hugegraph:conf/hugegraph.properties, hugegraph1:conf/hugegraph1.properties]

添加 hugegraph1.properties

拷贝 hugegraph.properties,命名为 hugegraph1.properties,修改图对应的数据库名以及关于后端部分的参数,比如:

store=hugegraph1

...

backend=rocksdb
serializer=binary

停止 Server,初始化执行 init-store.sh(为新的图创建数据库),重新启动 Server

$ bin/stop-hugegraph.sh
$ bin/init-store.sh
$ bin/start-hugegraph.sh

 hugegraph-studio 也要相应启动两个

发布了131 篇原创文章 · 获赞 33 · 访问量 66万+

猜你喜欢

转载自blog.csdn.net/zhangshenghang/article/details/103893172