From 67f59e200da73665e4510f6648d818036a83a047 Mon Sep 17 00:00:00 2001 From: VGalaxies Date: Sun, 21 Apr 2024 19:01:29 +0800 Subject: [PATCH 01/11] fix typo --- README.md | 2 +- hugegraph-server/Dockerfile | 4 ++-- hugegraph-server/hugegraph-dist/docker/README.md | 6 +++--- hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 61930248a5..cf64cd6743 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ achieved through [Gremlin](https://tinkerpop.apache.org/gremlin.html)(a powerful We can use `docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph` to quickly start an inner HugeGraph server with `RocksDB` (in backgrounds) for **test/dev**. You can visit [doc page](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#3-deploy) or -the [README](hugegraph-server/hugegraph-dist/docker/READEME.md) for more details. ([Docker Compose](./hugegraph-server/hugegraph-dist/docker/example)) +the [README](hugegraph-server/hugegraph-dist/docker/README.md) for more details. ([Docker Compose](./hugegraph-server/hugegraph-dist/docker/example)) > Note: > diff --git a/hugegraph-server/Dockerfile b/hugegraph-server/Dockerfile index 8eef58c5f7..ed6f3c40bb 100644 --- a/hugegraph-server/Dockerfile +++ b/hugegraph-server/Dockerfile @@ -34,7 +34,7 @@ LABEL maintainer="HugeGraph Docker Maintainers " # TODO: use g1gc or zgc as default ENV JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -XX:MaxRAMPercentage=50 -XshowSettings:vm" \ - HUGEGRAPH_HOME="hugegraph" + HUGEGRAPH_HOME="hugegraph-server" #COPY . /hugegraph/hugegraph-server WORKDIR /hugegraph-server/ @@ -59,7 +59,7 @@ RUN set -x \ COPY hugegraph-server/hugegraph-dist/docker/scripts/remote-connect.groovy ./scripts COPY hugegraph-server/hugegraph-dist/docker/scripts/detect-storage.groovy ./scripts COPY hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh . -RUN chmod 755 ./docker-entrypoint.sh +RUN chmod 755 ./docker-entrypoint.sh EXPOSE 8080 VOLUME /hugegraph-server diff --git a/hugegraph-server/hugegraph-dist/docker/README.md b/hugegraph-server/hugegraph-dist/docker/README.md index b9547d4982..00cf3d638e 100644 --- a/hugegraph-server/hugegraph-dist/docker/README.md +++ b/hugegraph-server/hugegraph-dist/docker/README.md @@ -4,7 +4,7 @@ > > 1. The docker image of hugegraph is a convenience release, not official distribution artifacts from ASF. You can find more details from [ASF Release Distribution Policy](https://infra.apache.org/release-distribution.html#dockerhub). > -> 2. Recommend to use `release tag`(like `1.2.0`) for the stable version. Use `latest` tag to experience the newest functions in development. +> 2. Recommend to use `release tag` (like `1.3.0`) for the stable version. Use `latest` tag to experience the newest functions in development. ## 1. Deploy @@ -35,7 +35,7 @@ If you want to customize the preloaded data, please mount the groovy scripts (no 1. Using docker run - Use `docker run -itd --name=graph -p 8080:8080 -e PRELOAD=true -v /path/to/yourScript:/hugegraph/scripts/example.groovy hugegraph/hugegraph` + Use `docker run -itd --name=graph -p 8080:8080 -e PRELOAD=true -v /absolute/path/to/your/script:/hugegraph-server/scripts/example.groovy hugegraph/hugegraph` to start hugegraph server. 2. Using docker compose @@ -50,7 +50,7 @@ If you want to customize the preloaded data, please mount the groovy scripts (no environment: - PRELOAD=true volumes: - - /path/to/yourscript:/hugegraph/scripts/example.groovy + - /absolute/path/to/your/script:/hugegraph-server/scripts/example.groovy ports: - 8080:8080 ``` diff --git a/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh b/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh index efd6a4f8e5..60cd4bc163 100644 --- a/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh +++ b/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh @@ -39,7 +39,7 @@ else echo "Hugegraph Initialization already done. Skipping re-init..." fi -# start hugegraph +# start hugegraph-server # remove "-g zgc" now, which is only available on ARM-Mac with java > 13 ./bin/start-hugegraph.sh -j "$JAVA_OPTS" From c715ff0ef9fe937808d7726813df7eb1f2bb4ed9 Mon Sep 17 00:00:00 2001 From: VGalaxies Date: Sun, 21 Apr 2024 19:01:44 +0800 Subject: [PATCH 02/11] intro docker for pd & store --- hugegraph-pd/Dockerfile | 58 +++++++++++++++++++ .../hg-pd-dist/docker/docker-entrypoint.sh | 22 +++++++ hugegraph-store/Dockerfile | 58 +++++++++++++++++++ .../hg-store-dist/docker/docker-entrypoint.sh | 22 +++++++ 4 files changed, 160 insertions(+) create mode 100644 hugegraph-pd/Dockerfile create mode 100644 hugegraph-pd/hg-pd-dist/docker/docker-entrypoint.sh create mode 100644 hugegraph-store/Dockerfile create mode 100644 hugegraph-store/hg-store-dist/docker/docker-entrypoint.sh diff --git a/hugegraph-pd/Dockerfile b/hugegraph-pd/Dockerfile new file mode 100644 index 0000000000..e1b2b12829 --- /dev/null +++ b/hugegraph-pd/Dockerfile @@ -0,0 +1,58 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# + +# Dockerfile for HugeGraph PD +# 1st stage: build source code (refer to hugegraph-server/Dockerfile) + +# 2nd stage: runtime env +# Note: ZGC (The Z Garbage Collector) is only supported on ARM-Mac with java > 13 +FROM openjdk:11-slim + +COPY --from=build /pkg/hugegraph-pd/dist/hugegraph-pd-*/ /hugegraph-pd/ +LABEL maintainer="HugeGraph Docker Maintainers " + +# TODO: use g1gc or zgc as default +ENV JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -XX:MaxRAMPercentage=50 -XshowSettings:vm" \ + HUGEGRAPH_HOME="hugegraph-pd" + +#COPY . /hugegraph/hugegraph-pd +WORKDIR /hugegraph-pd/ + +# 1. Install environment and init HugeGraph Sever +RUN set -x \ + && apt-get -q update \ + && apt-get -q install -y --no-install-recommends --no-install-suggests \ + dumb-init \ + procps \ + curl \ + lsof \ + vim \ + cron \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && service cron start \ + && pwd && cd /hugegraph-pd/ + +# 2. Init docker script +COPY hugegraph-pd/hg-pd-dist/docker/docker-entrypoint.sh . +RUN chmod 755 ./docker-entrypoint.sh + +EXPOSE 8620 +VOLUME /hugegraph-server + +ENTRYPOINT ["/usr/bin/dumb-init", "--"] +CMD ["./docker-entrypoint.sh"] diff --git a/hugegraph-pd/hg-pd-dist/docker/docker-entrypoint.sh b/hugegraph-pd/hg-pd-dist/docker/docker-entrypoint.sh new file mode 100644 index 0000000000..fd894d5518 --- /dev/null +++ b/hugegraph-pd/hg-pd-dist/docker/docker-entrypoint.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# + +# start hugegraph pd +./bin/start-hugegraph-pd.sh -j "$JAVA_OPTS" + +tail -f /dev/null diff --git a/hugegraph-store/Dockerfile b/hugegraph-store/Dockerfile new file mode 100644 index 0000000000..0e7a333963 --- /dev/null +++ b/hugegraph-store/Dockerfile @@ -0,0 +1,58 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# + +# Dockerfile for HugeGraph Store +# 1st stage: build source code (refer to hugegraph-server/Dockerfile) + +# 2nd stage: runtime env +# Note: ZGC (The Z Garbage Collector) is only supported on ARM-Mac with java > 13 +FROM openjdk:11-slim + +COPY --from=build /pkg/hugegraph-store/dist/hugegraph-store-*/ /hugegraph-store/ +LABEL maintainer="HugeGraph Docker Maintainers " + +# TODO: use g1gc or zgc as default +ENV JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -XX:MaxRAMPercentage=50 -XshowSettings:vm" \ + HUGEGRAPH_HOME="hugegraph-store" + +#COPY . /hugegraph/hugegraph-store +WORKDIR /hugegraph-store/ + +# 1. Install environment and init HugeGraph Sever +RUN set -x \ + && apt-get -q update \ + && apt-get -q install -y --no-install-recommends --no-install-suggests \ + dumb-init \ + procps \ + curl \ + lsof \ + vim \ + cron \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && service cron start \ + && pwd && cd /hugegraph-store/ + +# 2. Init docker script +COPY hugegraph-store/hg-store-dist/docker/docker-entrypoint.sh . +RUN chmod 755 ./docker-entrypoint.sh + +EXPOSE 8620 +VOLUME /hugegraph-server + +ENTRYPOINT ["/usr/bin/dumb-init", "--"] +CMD ["./docker-entrypoint.sh"] diff --git a/hugegraph-store/hg-store-dist/docker/docker-entrypoint.sh b/hugegraph-store/hg-store-dist/docker/docker-entrypoint.sh new file mode 100644 index 0000000000..5aa77621dc --- /dev/null +++ b/hugegraph-store/hg-store-dist/docker/docker-entrypoint.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# + +# start hugegraph store +./bin/start-hugegraph-store.sh -j "$JAVA_OPTS" + +tail -f /dev/null From d95deeddf5bc3fb145b10b511189d98f170218e3 Mon Sep 17 00:00:00 2001 From: VGalaxies Date: Sun, 21 Apr 2024 19:07:36 +0800 Subject: [PATCH 03/11] fix --- hugegraph-pd/Dockerfile | 2 +- hugegraph-store/Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hugegraph-pd/Dockerfile b/hugegraph-pd/Dockerfile index e1b2b12829..140a782184 100644 --- a/hugegraph-pd/Dockerfile +++ b/hugegraph-pd/Dockerfile @@ -52,7 +52,7 @@ COPY hugegraph-pd/hg-pd-dist/docker/docker-entrypoint.sh . RUN chmod 755 ./docker-entrypoint.sh EXPOSE 8620 -VOLUME /hugegraph-server +VOLUME /hugegraph-pd ENTRYPOINT ["/usr/bin/dumb-init", "--"] CMD ["./docker-entrypoint.sh"] diff --git a/hugegraph-store/Dockerfile b/hugegraph-store/Dockerfile index 0e7a333963..c7b41d735f 100644 --- a/hugegraph-store/Dockerfile +++ b/hugegraph-store/Dockerfile @@ -51,8 +51,8 @@ RUN set -x \ COPY hugegraph-store/hg-store-dist/docker/docker-entrypoint.sh . RUN chmod 755 ./docker-entrypoint.sh -EXPOSE 8620 -VOLUME /hugegraph-server +EXPOSE 8520 +VOLUME /hugegraph-store ENTRYPOINT ["/usr/bin/dumb-init", "--"] CMD ["./docker-entrypoint.sh"] From efac40badfc4cd42ea540cc72394f66b28f42ef1 Mon Sep 17 00:00:00 2001 From: VGalaxies Date: Thu, 25 Apr 2024 18:12:45 +0800 Subject: [PATCH 04/11] reset --- hugegraph-pd/Dockerfile | 10 +++++++++- hugegraph-server/Dockerfile | 3 ++- hugegraph-store/Dockerfile | 10 +++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/hugegraph-pd/Dockerfile b/hugegraph-pd/Dockerfile index 140a782184..748d93e906 100644 --- a/hugegraph-pd/Dockerfile +++ b/hugegraph-pd/Dockerfile @@ -16,7 +16,15 @@ # # Dockerfile for HugeGraph PD -# 1st stage: build source code (refer to hugegraph-server/Dockerfile) +# 1st stage: build source code +FROM maven:3.9.0-eclipse-temurin-11 AS build + +COPY . /pkg +WORKDIR /pkg +ARG MAVEN_ARGS + +RUN mvn package $MAVEN_ARGS -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l +RUN rm ./hugegraph-server/*.tar.gz && rm ./hugegraph-pd/dist/*.tar.gz && rm ./hugegraph-store/dist/*.tar.gz # 2nd stage: runtime env # Note: ZGC (The Z Garbage Collector) is only supported on ARM-Mac with java > 13 diff --git a/hugegraph-server/Dockerfile b/hugegraph-server/Dockerfile index ed6f3c40bb..f76c1c5ccd 100644 --- a/hugegraph-server/Dockerfile +++ b/hugegraph-server/Dockerfile @@ -23,7 +23,8 @@ COPY . /pkg WORKDIR /pkg ARG MAVEN_ARGS -RUN mvn package $MAVEN_ARGS -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l && rm ./hugegraph-server/*.tar.gz +RUN mvn package $MAVEN_ARGS -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l +RUN rm ./hugegraph-server/*.tar.gz && rm ./hugegraph-pd/dist/*.tar.gz && rm ./hugegraph-store/dist/*.tar.gz # 2nd stage: runtime env # Note: ZGC (The Z Garbage Collector) is only supported on ARM-Mac with java > 13 diff --git a/hugegraph-store/Dockerfile b/hugegraph-store/Dockerfile index c7b41d735f..6948411ddb 100644 --- a/hugegraph-store/Dockerfile +++ b/hugegraph-store/Dockerfile @@ -16,7 +16,15 @@ # # Dockerfile for HugeGraph Store -# 1st stage: build source code (refer to hugegraph-server/Dockerfile) +# 1st stage: build source code +FROM maven:3.9.0-eclipse-temurin-11 AS build + +COPY . /pkg +WORKDIR /pkg +ARG MAVEN_ARGS + +RUN mvn package $MAVEN_ARGS -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true && pwd && ls -l +RUN rm ./hugegraph-server/*.tar.gz && rm ./hugegraph-pd/dist/*.tar.gz && rm ./hugegraph-store/dist/*.tar.gz # 2nd stage: runtime env # Note: ZGC (The Z Garbage Collector) is only supported on ARM-Mac with java > 13 From 1fb9dbddf7f4620bdea0b8d537bd21ab6e8bbf1b Mon Sep 17 00:00:00 2001 From: VGalaxies Date: Thu, 25 Apr 2024 21:20:41 +0800 Subject: [PATCH 05/11] intro docker compose --- docker/configs/application-pd0.yml | 78 ++++++++ docker/configs/application-pd1.yml | 78 ++++++++ docker/configs/application-pd2.yml | 78 ++++++++ docker/configs/application-store0.yml | 64 +++++++ docker/configs/application-store1.yml | 64 +++++++ docker/configs/application-store2.yml | 64 +++++++ docker/configs/server1-conf/computer.yaml | 39 ++++ .../server1-conf/graphs/hugegraph.properties | 109 +++++++++++ .../server1-conf/gremlin-driver-settings.yaml | 25 +++ .../configs/server1-conf/gremlin-server.yaml | 127 +++++++++++++ .../server1-conf/hugegraph-server.keystore | Bin 0 -> 1733 bytes docker/configs/server1-conf/log4j2.xml | 144 ++++++++++++++ .../configs/server1-conf/remote-objects.yaml | 30 +++ docker/configs/server1-conf/remote.yaml | 25 +++ .../server1-conf/rest-server.properties | 53 ++++++ docker/configs/server2-conf/computer.yaml | 39 ++++ .../server2-conf/graphs/hugegraph.properties | 109 +++++++++++ .../server2-conf/gremlin-driver-settings.yaml | 25 +++ .../configs/server2-conf/gremlin-server.yaml | 127 +++++++++++++ .../server2-conf/hugegraph-server.keystore | Bin 0 -> 1733 bytes docker/configs/server2-conf/log4j2.xml | 144 ++++++++++++++ .../configs/server2-conf/remote-objects.yaml | 30 +++ docker/configs/server2-conf/remote.yaml | 25 +++ .../server2-conf/rest-server.properties | 53 ++++++ docker/configs/server3-conf/computer.yaml | 39 ++++ .../server3-conf/graphs/hugegraph.properties | 109 +++++++++++ .../server3-conf/gremlin-driver-settings.yaml | 25 +++ .../configs/server3-conf/gremlin-server.yaml | 127 +++++++++++++ .../server3-conf/hugegraph-server.keystore | Bin 0 -> 1733 bytes docker/configs/server3-conf/log4j2.xml | 144 ++++++++++++++ .../configs/server3-conf/remote-objects.yaml | 30 +++ docker/configs/server3-conf/remote.yaml | 25 +++ .../server3-conf/rest-server.properties | 53 ++++++ docker/docker-compose.3pd-3store-3server.yml | 178 ++++++++++++++++++ docker/docker-compose.yml | 58 ++++++ 35 files changed, 2318 insertions(+) create mode 100644 docker/configs/application-pd0.yml create mode 100644 docker/configs/application-pd1.yml create mode 100644 docker/configs/application-pd2.yml create mode 100644 docker/configs/application-store0.yml create mode 100644 docker/configs/application-store1.yml create mode 100644 docker/configs/application-store2.yml create mode 100644 docker/configs/server1-conf/computer.yaml create mode 100644 docker/configs/server1-conf/graphs/hugegraph.properties create mode 100644 docker/configs/server1-conf/gremlin-driver-settings.yaml create mode 100644 docker/configs/server1-conf/gremlin-server.yaml create mode 100644 docker/configs/server1-conf/hugegraph-server.keystore create mode 100644 docker/configs/server1-conf/log4j2.xml create mode 100644 docker/configs/server1-conf/remote-objects.yaml create mode 100644 docker/configs/server1-conf/remote.yaml create mode 100644 docker/configs/server1-conf/rest-server.properties create mode 100644 docker/configs/server2-conf/computer.yaml create mode 100644 docker/configs/server2-conf/graphs/hugegraph.properties create mode 100644 docker/configs/server2-conf/gremlin-driver-settings.yaml create mode 100644 docker/configs/server2-conf/gremlin-server.yaml create mode 100644 docker/configs/server2-conf/hugegraph-server.keystore create mode 100644 docker/configs/server2-conf/log4j2.xml create mode 100644 docker/configs/server2-conf/remote-objects.yaml create mode 100644 docker/configs/server2-conf/remote.yaml create mode 100644 docker/configs/server2-conf/rest-server.properties create mode 100644 docker/configs/server3-conf/computer.yaml create mode 100644 docker/configs/server3-conf/graphs/hugegraph.properties create mode 100644 docker/configs/server3-conf/gremlin-driver-settings.yaml create mode 100644 docker/configs/server3-conf/gremlin-server.yaml create mode 100644 docker/configs/server3-conf/hugegraph-server.keystore create mode 100644 docker/configs/server3-conf/log4j2.xml create mode 100644 docker/configs/server3-conf/remote-objects.yaml create mode 100644 docker/configs/server3-conf/remote.yaml create mode 100644 docker/configs/server3-conf/rest-server.properties create mode 100644 docker/docker-compose.3pd-3store-3server.yml create mode 100644 docker/docker-compose.yml diff --git a/docker/configs/application-pd0.yml b/docker/configs/application-pd0.yml new file mode 100644 index 0000000000..40436fe3c2 --- /dev/null +++ b/docker/configs/application-pd0.yml @@ -0,0 +1,78 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# + +spring: + application: + name: hugegraph-pd + +management: + metrics: + export: + prometheus: + enabled: true + endpoints: + web: + exposure: + include: "*" + +logging: + config: 'file:./conf/log4j2.xml' +license: + verify-path: ./conf/verify-license.json + license-path: ./conf/hugegraph.license +grpc: + port: 8686 + # grpc 的服务地址,部署时需要改为本地实际 IPv4 地址 + host: 127.0.0.1 + +server: + # rest 服务端口号 + port: 8620 + +pd: + # 存储路径 + data-path: ./pd_data + # 自动扩容的检查周期,定时检查每个 store 的分区数量,自动进行分区数量平衡 + patrol-interval: 1800 + # 初始 store 列表,在列表内的 store 自动激活 + initial-store-count: 3 + # grpc IP:grpc port + initial-store-list: 127.0.0.1:8500,127.0.0.1:8501,127.0.0.1:8502 + +raft: + # 本机 raft 服务地址 + address: 127.0.0.1:8610 + # pd 集群服务地址 + peers-list: 127.0.0.1:8610,127.0.0.1:8611,127.0.0.1:8612 + +store: + # store 下线时间。超过该时间,认为 store 永久不可用,分配副本到其他机器,单位秒 + max-down-time: 172800 + # 是否开启 store 监控数据存储 + monitor_data_enabled: true + # 监控数据的间隔,minute (默认), hour, second + # default: 1 min * 1 day = 1440 + monitor_data_interval: 1 minute + # 监控数据的保留时间 1 天; day, month, year + monitor_data_retention: 1 day + initial-store-count: 1 + +partition: + # 默认每个分区副本数 + default-shard-count: 1 + # 默认每机器最大副本数,初始分区数 = store-max-shard-count * store-number / default-shard-count + store-max-shard-count: 12 diff --git a/docker/configs/application-pd1.yml b/docker/configs/application-pd1.yml new file mode 100644 index 0000000000..41d86e181b --- /dev/null +++ b/docker/configs/application-pd1.yml @@ -0,0 +1,78 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# + +spring: + application: + name: hugegraph-pd + +management: + metrics: + export: + prometheus: + enabled: true + endpoints: + web: + exposure: + include: "*" + +logging: + config: 'file:./conf/log4j2.xml' +license: + verify-path: ./conf/verify-license.json + license-path: ./conf/hugegraph.license +grpc: + port: 8687 + # grpc 的服务地址,部署时需要改为本地实际 IPv4 地址 + host: 127.0.0.1 + +server: + # rest 服务端口号 + port: 8621 + +pd: + # 存储路径 + data-path: ./pd_data + # 自动扩容的检查周期,定时检查每个 store 的分区数量,自动进行分区数量平衡 + patrol-interval: 1800 + # 初始 store 列表,在列表内的 store 自动激活 + initial-store-count: 3 + # grpc IP:grpc port + initial-store-list: 127.0.0.1:8500,127.0.0.1:8501,127.0.0.1:8502 + +raft: + # 本机 raft 服务地址 + address: 127.0.0.1:8611 + # pd 集群服务地址 + peers-list: 127.0.0.1:8610,127.0.0.1:8611,127.0.0.1:8612 + +store: + # store 下线时间。超过该时间,认为 store 永久不可用,分配副本到其他机器,单位秒 + max-down-time: 172800 + # 是否开启 store 监控数据存储 + monitor_data_enabled: true + # 监控数据的间隔,minute (默认), hour, second + # default: 1 min * 1 day = 1440 + monitor_data_interval: 1 minute + # 监控数据的保留时间 1 天; day, month, year + monitor_data_retention: 1 day + initial-store-count: 1 + +partition: + # 默认每个分区副本数 + default-shard-count: 1 + # 默认每机器最大副本数,初始分区数 = store-max-shard-count * store-number / default-shard-count + store-max-shard-count: 12 diff --git a/docker/configs/application-pd2.yml b/docker/configs/application-pd2.yml new file mode 100644 index 0000000000..91b2197c62 --- /dev/null +++ b/docker/configs/application-pd2.yml @@ -0,0 +1,78 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# + +spring: + application: + name: hugegraph-pd + +management: + metrics: + export: + prometheus: + enabled: true + endpoints: + web: + exposure: + include: "*" + +logging: + config: 'file:./conf/log4j2.xml' +license: + verify-path: ./conf/verify-license.json + license-path: ./conf/hugegraph.license +grpc: + port: 8688 + # grpc 的服务地址,部署时需要改为本地实际 IPv4 地址 + host: 127.0.0.1 + +server: + # rest 服务端口号 + port: 8622 + +pd: + # 存储路径 + data-path: ./pd_data + # 自动扩容的检查周期,定时检查每个 store 的分区数量,自动进行分区数量平衡 + patrol-interval: 1800 + # 初始 store 列表,在列表内的 store 自动激活 + initial-store-count: 3 + # grpc IP:grpc port + initial-store-list: 127.0.0.1:8500,127.0.0.1:8501,127.0.0.1:8502 + +raft: + # 本机 raft 服务地址 + address: 127.0.0.1:8612 + # pd 集群服务地址 + peers-list: 127.0.0.1:8610,127.0.0.1:8611,127.0.0.1:8612 + +store: + # store 下线时间。超过该时间,认为 store 永久不可用,分配副本到其他机器,单位秒 + max-down-time: 172800 + # 是否开启 store 监控数据存储 + monitor_data_enabled: true + # 监控数据的间隔,minute (默认), hour, second + # default: 1 min * 1 day = 1440 + monitor_data_interval: 1 minute + # 监控数据的保留时间 1 天; day, month, year + monitor_data_retention: 1 day + initial-store-count: 1 + +partition: + # 默认每个分区副本数 + default-shard-count: 1 + # 默认每机器最大副本数,初始分区数 = store-max-shard-count * store-number / default-shard-count + store-max-shard-count: 12 diff --git a/docker/configs/application-store0.yml b/docker/configs/application-store0.yml new file mode 100644 index 0000000000..75b743c2a3 --- /dev/null +++ b/docker/configs/application-store0.yml @@ -0,0 +1,64 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# + +pdserver: + # pd 服务地址,多个 pd 地址用逗号分割 + address: 127.0.0.1:8686,127.0.0.1:8687,127.0.0.1:8688 + +management: + metrics: + export: + prometheus: + enabled: true + endpoints: + web: + exposure: + include: "*" + +grpc: + # grpc 的服务地址 + host: 127.0.0.1 + port: 8500 + netty-server: + max-inbound-message-size: 1000MB +raft: + # raft 缓存队列大小 + disruptorBufferSize: 1024 + address: 127.0.0.1:8510 + max-log-file-size: 600000000000 + # 快照生成时间间隔,单位秒 + snapshotInterval: 1800 +server: + # rest 服务地址 + port: 8520 + +app: + # 存储路径,支持多个路径,逗号分割 + data-path: ./storage + #raft-path: ./storage + +spring: + application: + name: store-node-grpc-server + profiles: + active: default + include: pd + +logging: + config: 'file:./conf/log4j2.xml' + level: + root: info diff --git a/docker/configs/application-store1.yml b/docker/configs/application-store1.yml new file mode 100644 index 0000000000..e4b2824ff9 --- /dev/null +++ b/docker/configs/application-store1.yml @@ -0,0 +1,64 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# + +pdserver: + # pd 服务地址,多个 pd 地址用逗号分割 + address: 127.0.0.1:8686,127.0.0.1:8687,127.0.0.1:8688 + +management: + metrics: + export: + prometheus: + enabled: true + endpoints: + web: + exposure: + include: "*" + +grpc: + # grpc 的服务地址 + host: 127.0.0.1 + port: 8501 + netty-server: + max-inbound-message-size: 1000MB +raft: + # raft 缓存队列大小 + disruptorBufferSize: 1024 + address: 127.0.0.1:8511 + max-log-file-size: 600000000000 + # 快照生成时间间隔,单位秒 + snapshotInterval: 1800 +server: + # rest 服务地址 + port: 8521 + +app: + # 存储路径,支持多个路径,逗号分割 + data-path: ./storage + #raft-path: ./storage + +spring: + application: + name: store-node-grpc-server + profiles: + active: default + include: pd + +logging: + config: 'file:./conf/log4j2.xml' + level: + root: info diff --git a/docker/configs/application-store2.yml b/docker/configs/application-store2.yml new file mode 100644 index 0000000000..324327cea7 --- /dev/null +++ b/docker/configs/application-store2.yml @@ -0,0 +1,64 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# + +pdserver: + # pd 服务地址,多个 pd 地址用逗号分割 + address: 127.0.0.1:8686,127.0.0.1:8687,127.0.0.1:8688 + +management: + metrics: + export: + prometheus: + enabled: true + endpoints: + web: + exposure: + include: "*" + +grpc: + # grpc 的服务地址 + host: 127.0.0.1 + port: 8502 + netty-server: + max-inbound-message-size: 1000MB +raft: + # raft 缓存队列大小 + disruptorBufferSize: 1024 + address: 127.0.0.1:8512 + max-log-file-size: 600000000000 + # 快照生成时间间隔,单位秒 + snapshotInterval: 1800 +server: + # rest 服务地址 + port: 8522 + +app: + # 存储路径,支持多个路径,逗号分割 + data-path: ./storage + #raft-path: ./storage + +spring: + application: + name: store-node-grpc-server + profiles: + active: default + include: pd + +logging: + config: 'file:./conf/log4j2.xml' + level: + root: info diff --git a/docker/configs/server1-conf/computer.yaml b/docker/configs/server1-conf/computer.yaml new file mode 100644 index 0000000000..1c69388bb0 --- /dev/null +++ b/docker/configs/server1-conf/computer.yaml @@ -0,0 +1,39 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +# common parameters +common: { + worker_heap: 10000, + vertex_input_dir: /data, + workers: 51, + zookeeper_list: "127.0.0.1:2181", + max_edges_per_segment: 10485760, + edges_immutable: true, + partitions: 255, + compute_threads: 5, + input_threads: 5, + message_async: false, + message_queue_size: 1000, + message_send_threads: 10, + messages_per_segment: 104857600, + hugegraph_url: "http://127.0.0.1:8080", + hugegraph_name: hugegraph, + hugegraph_timeout: 60 +} + +env: { + computer_home: /home/computer +} diff --git a/docker/configs/server1-conf/graphs/hugegraph.properties b/docker/configs/server1-conf/graphs/hugegraph.properties new file mode 100644 index 0000000000..532b11f209 --- /dev/null +++ b/docker/configs/server1-conf/graphs/hugegraph.properties @@ -0,0 +1,109 @@ +# gremlin entrance to create graph +# auth config: org.apache.hugegraph.auth.HugeFactoryAuthProxy +gremlin.graph=org.apache.hugegraph.HugeFactory + +# cache config +#schema.cache_capacity=100000 +# vertex-cache default is 1000w, 10min expired +vertex.cache_type=l2 +#vertex.cache_capacity=10000000 +#vertex.cache_expire=600 +# edge-cache default is 100w, 10min expired +edge.cache_type=l2 +#edge.cache_capacity=1000000 +#edge.cache_expire=600 + + +# schema illegal name template +#schema.illegal_name_regex=\s+|~.* + +#vertex.default_label=vertex + +backend=hstore +serializer=binary + +store=hugegraph + +# pd config +pd.peers=127.0.0.1:8686,127.0.0.1:8687,127.0.0.1:8688 + +# task config +task.scheduler_type=local +task.schedule_period=10 +task.retry=0 +task.wait_timeout=10 + +# raft config +raft.mode=false +raft.path=./raft-log +raft.safe_read=true +raft.use_replicator_pipeline=true +raft.election_timeout=10000 +raft.snapshot_interval=3600 +raft.backend_threads=48 +raft.read_index_threads=8 +raft.snapshot_threads=4 +raft.snapshot_parallel_compress=false +raft.snapshot_compress_threads=4 +raft.snapshot_decompress_threads=4 +raft.read_strategy=ReadOnlyLeaseBased +raft.queue_size=16384 +raft.queue_publish_timeout=60 +raft.apply_batch=1 +raft.rpc_threads=80 +raft.rpc_connect_timeout=5000 +raft.rpc_timeout=60 +raft.install_snapshot_rpc_timeout=36000 + +# search config +search.text_analyzer=jieba +search.text_analyzer_mode=INDEX + +# rocksdb backend config +#rocksdb.data_path=/path/to/disk +#rocksdb.wal_path=/path/to/disk + + +# cassandra backend config +cassandra.host=localhost +cassandra.port=9042 +cassandra.username= +cassandra.password= +#cassandra.connect_timeout=5 +#cassandra.read_timeout=20 +#cassandra.keyspace.strategy=SimpleStrategy +#cassandra.keyspace.replication=3 + +# hbase backend config +#hbase.hosts=localhost +#hbase.port=2181 +#hbase.znode_parent=/hbase +#hbase.threads_max=64 +# IMPORTANT: recommend to modify the HBase partition number +# by the actual/env data amount & RS amount before init store +# It will influence the load speed a lot +#hbase.enable_partition=true +#hbase.vertex_partitions=10 +#hbase.edge_partitions=30 + +# mysql backend config +#jdbc.driver=com.mysql.jdbc.Driver +#jdbc.url=jdbc:mysql://127.0.0.1:3306 +#jdbc.username=root +#jdbc.password= +#jdbc.reconnect_max_times=3 +#jdbc.reconnect_interval=3 +#jdbc.ssl_mode=false + +# postgresql & cockroachdb backend config +#jdbc.driver=org.postgresql.Driver +#jdbc.url=jdbc:postgresql://localhost:5432/ +#jdbc.username=postgres +#jdbc.password= +#jdbc.postgresql.connect_database=template1 + +# palo backend config +#palo.host=127.0.0.1 +#palo.poll_interval=10 +#palo.temp_dir=./palo-data +#palo.file_limit_size=32 diff --git a/docker/configs/server1-conf/gremlin-driver-settings.yaml b/docker/configs/server1-conf/gremlin-driver-settings.yaml new file mode 100644 index 0000000000..2f60ff8379 --- /dev/null +++ b/docker/configs/server1-conf/gremlin-driver-settings.yaml @@ -0,0 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +hosts: [localhost] +port: 8181 +serializer: { + className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } +} diff --git a/docker/configs/server1-conf/gremlin-server.yaml b/docker/configs/server1-conf/gremlin-server.yaml new file mode 100644 index 0000000000..df73386b26 --- /dev/null +++ b/docker/configs/server1-conf/gremlin-server.yaml @@ -0,0 +1,127 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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 and port of gremlin server, need to be consistent with host and port in rest-server.properties +host: 127.0.0.1 +port: 8181 + +# timeout in ms of gremlin query +evaluationTimeout: 30000 + +channelizer: org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer +# don't set graph at here, this happens after support for dynamically adding graph +graphs: { +} +scriptEngines: { + gremlin-groovy: { + staticImports: [ + org.opencypher.gremlin.process.traversal.CustomPredicates.*', + org.opencypher.gremlin.traversal.CustomFunctions.* + ], + plugins: { + org.apache.hugegraph.plugin.HugeGraphGremlinPlugin: {}, + org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {}, + org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: { + classImports: [ + java.lang.Math, + org.apache.hugegraph.backend.id.IdGenerator, + org.apache.hugegraph.type.define.Directions, + org.apache.hugegraph.type.define.NodeRole, + org.apache.hugegraph.masterelection.GlobalMasterInfo, + org.apache.hugegraph.util.DateUtil, + org.apache.hugegraph.traversal.algorithm.CollectionPathsTraverser, + org.apache.hugegraph.traversal.algorithm.CountTraverser, + org.apache.hugegraph.traversal.algorithm.CustomizedCrosspointsTraverser, + org.apache.hugegraph.traversal.algorithm.CustomizePathsTraverser, + org.apache.hugegraph.traversal.algorithm.FusiformSimilarityTraverser, + org.apache.hugegraph.traversal.algorithm.HugeTraverser, + org.apache.hugegraph.traversal.algorithm.JaccardSimilarTraverser, + org.apache.hugegraph.traversal.algorithm.KneighborTraverser, + org.apache.hugegraph.traversal.algorithm.KoutTraverser, + org.apache.hugegraph.traversal.algorithm.MultiNodeShortestPathTraverser, + org.apache.hugegraph.traversal.algorithm.NeighborRankTraverser, + org.apache.hugegraph.traversal.algorithm.PathsTraverser, + org.apache.hugegraph.traversal.algorithm.PersonalRankTraverser, + org.apache.hugegraph.traversal.algorithm.SameNeighborTraverser, + org.apache.hugegraph.traversal.algorithm.ShortestPathTraverser, + org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser, + org.apache.hugegraph.traversal.algorithm.SubGraphTraverser, + org.apache.hugegraph.traversal.algorithm.TemplatePathsTraverser, + org.apache.hugegraph.traversal.algorithm.steps.EdgeStep, + org.apache.hugegraph.traversal.algorithm.steps.RepeatEdgeStep, + org.apache.hugegraph.traversal.algorithm.steps.WeightedEdgeStep, + org.apache.hugegraph.traversal.optimize.ConditionP, + org.apache.hugegraph.traversal.optimize.Text, + org.apache.hugegraph.traversal.optimize.TraversalUtil, + org.opencypher.gremlin.traversal.CustomFunctions, + org.opencypher.gremlin.traversal.CustomPredicate + ], + methodImports: [ + java.lang.Math#*, + org.opencypher.gremlin.traversal.CustomPredicate#*, + org.opencypher.gremlin.traversal.CustomFunctions#* + ] + }, + org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: { + files: [scripts/empty-sample.groovy] + } + } + } +} +serializers: + - {className: org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } + } + - {className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } + } + - {className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV2d0, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } + } + - {className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } + } +metrics: { + consoleReporter: {enabled: false, interval: 180000}, + csvReporter: {enabled: false, interval: 180000, fileName: ./metrics/gremlin-server-metrics.csv}, + jmxReporter: {enabled: false}, + slf4jReporter: {enabled: false, 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 +ssl: { + enabled: false +} diff --git a/docker/configs/server1-conf/hugegraph-server.keystore b/docker/configs/server1-conf/hugegraph-server.keystore new file mode 100644 index 0000000000000000000000000000000000000000..e60c6b4c4ca066e165da3d5d880d1d780fb976fa GIT binary patch literal 1733 zcmY+Ddpy$%AIG=fE(|Ga?rAuU*g9>lOK50Vh`IC}mng;DNp@z;ZSGOxoCwvnE-uGq zDvFJhdlwG}L!yr6l3Oi0E~QnE=XpKPdCvLc^ZLGCpU?OE`Rn_}v*8^87=mZR6W|EL zEXSD}sBL@KwiMv<|GiR>0|Q((a39YG_;>@j z-2d$Da!n}8dwGrI^Jeazr<}U>@X`FvaOUzL00DKmLD@j6-U}=!sw|0~-#YB(_U&lC z;2bWbKk3MH1SjB*xD{hl9zVztK2i@k`6_a{AsjrB_*RV-5p=s7em>x9dHui`?TStC zew}Gp>C>!?6P|Te@;$LGQQ@!!h8+yzSu0*0XVnWI?$fJP2^-eKF0Cx!V*U^-{v7&A zZA)dtgq1S4RU$X4xG}fPdshqkuFQ-5jQQqNzPxSM^!`N$P^S0`-_ zX(=iHHj(PsxSFVEf0maY!V~9bRul*qF&EgQVYVAJ2g33ytqjMa`v#g3W)e>XCt&8$ z9If&8^~q8hYo?*IcbyxxCP?xwDcKHGKu(6Dd-o;A^ri$)$$tD$r(Ao8=wH@58K(W_ z@_}~?6j58xVHV?g_CpdfR*5+Z$=PkI3-MhCL^TIVk3N15Er{zpuTJWsGzsHJ%Fru! z{o15CkKJtFt}OfYy)IMcnF?&wDVLp&W7H<-_kf#+s5fv6V^)xZ{ZCw1m}vp)HD)J$SzCL@+;WnBb& zyw0C5jzAGmdy$|J5FJDV1#K%9bQ%-`3i<1bG64ledWJ>@X%o!wrg)+m{*VdL%zT>% zlRtZ8;9NEYvu)`BV9@r^_b3!Eq#=y}Xp}6cncLNk)#myqh|?Uf zu#q_2Km9KKA=C@ZP+&<}b1Iu^JHhUU?UR|!$f-I^6W-~x5qUwla8u_tX*$ZoHT<&b3|1oa%&cIWheq1!vp7}vo&|KS@csHK&>Ce4GlhAG-Q1r zmnF8Bp{++bw3liV*ab;^waVWNQ;cbFZ9VA1Y)=RD7Lm^7r6NZm?O5cBk_7eT9(@ z#V+49ncJ&NBfmTO%vM3)>L&@ogFTk>U}`zLNH-nz>fD=Q|AZrYr&Ek8yxr5%1lJq$ zuMC8=D>7uEsuqvT5>#cyV1BMNg~w2vHB1buzv1(+;CD=JxXaDf`~hox#GZLq(_uo9 zrPofrOMz?k<-#fe_p&8jfMHP2SZt({*B$Grc^_|u%?x?dy@TIK@fTrtVsZ%qKVGz? zJ(&Vd#8Db?$uzt1l<{UG^LdhGlfFhen!o3hw%YK(kA|3QKO|X^MHcRGJK?XP)O(z- z^uo_Ssjc@571 literal 0 HcmV?d00001 diff --git a/docker/configs/server1-conf/log4j2.xml b/docker/configs/server1-conf/log4j2.xml new file mode 100644 index 0000000000..f1dd7e8395 --- /dev/null +++ b/docker/configs/server1-conf/log4j2.xml @@ -0,0 +1,144 @@ + + + + + + logs + hugegraph-server + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docker/configs/server1-conf/remote-objects.yaml b/docker/configs/server1-conf/remote-objects.yaml new file mode 100644 index 0000000000..94ebc99190 --- /dev/null +++ b/docker/configs/server1-conf/remote-objects.yaml @@ -0,0 +1,30 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +hosts: [localhost] +port: 8181 +serializer: { + className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, + config: { + serializeResultToString: false, + # The duplication of HugeGraphIoRegistry is meant to fix a bug in the + # 'org.apache.tinkerpop.gremlin.driver.Settings:from(Configuration)' method. + ioRegistries: [ + org.apache.hugegraph.io.HugeGraphIoRegistry, + org.apache.hugegraph.io.HugeGraphIoRegistry + ] + } +} diff --git a/docker/configs/server1-conf/remote.yaml b/docker/configs/server1-conf/remote.yaml new file mode 100644 index 0000000000..2f60ff8379 --- /dev/null +++ b/docker/configs/server1-conf/remote.yaml @@ -0,0 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +hosts: [localhost] +port: 8181 +serializer: { + className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } +} diff --git a/docker/configs/server1-conf/rest-server.properties b/docker/configs/server1-conf/rest-server.properties new file mode 100644 index 0000000000..9c5bf3f3f2 --- /dev/null +++ b/docker/configs/server1-conf/rest-server.properties @@ -0,0 +1,53 @@ +# bind url +restserver.url=http://127.0.0.1:8081 +# gremlin server url, need to be consistent with host and port in gremlin-server.yaml +gremlinserver.url=http://127.0.0.1:8181 + +graphs=./conf/graphs + +# The maximum thread ratio for batch writing, only take effect if the batch.max_write_threads is 0 +batch.max_write_ratio=80 +batch.max_write_threads=0 + +# configuration of arthas +arthas.telnet_port=8562 +arthas.http_port=8561 +arthas.ip=127.0.0.1 +arthas.disabled_commands=jad + +# authentication configs +# choose 'org.apache.hugegraph.auth.StandardAuthenticator' or +# 'org.apache.hugegraph.auth.ConfigAuthenticator' +#auth.authenticator= + +# for StandardAuthenticator mode +#auth.graph_store=hugegraph +# auth client config +#auth.remote_url=127.0.0.1:8899,127.0.0.1:8898,127.0.0.1:8897 + +# for ConfigAuthenticator mode +#auth.admin_token= +#auth.user_tokens=[] + +# rpc server configs for multi graph-servers or raft-servers +rpc.server_host=127.0.0.1 +rpc.server_port=8091 +#rpc.server_timeout=30 + +# rpc client configs (like enable to keep cache consistency) +#rpc.remote_url=127.0.0.1:8091,127.0.0.1:8092,127.0.0.1:8093 +#rpc.client_connect_timeout=20 +#rpc.client_reconnect_period=10 +#rpc.client_read_timeout=40 +#rpc.client_retries=3 +#rpc.client_load_balancer=consistentHash + +# raft group initial peers +#raft.group_peers=127.0.0.1:8091,127.0.0.1:8092,127.0.0.1:8093 + +# lightweight load balancing (beta) +server.id=server-1 +server.role=master + +# slow query log +log.slow_query_threshold=1000 diff --git a/docker/configs/server2-conf/computer.yaml b/docker/configs/server2-conf/computer.yaml new file mode 100644 index 0000000000..1c69388bb0 --- /dev/null +++ b/docker/configs/server2-conf/computer.yaml @@ -0,0 +1,39 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +# common parameters +common: { + worker_heap: 10000, + vertex_input_dir: /data, + workers: 51, + zookeeper_list: "127.0.0.1:2181", + max_edges_per_segment: 10485760, + edges_immutable: true, + partitions: 255, + compute_threads: 5, + input_threads: 5, + message_async: false, + message_queue_size: 1000, + message_send_threads: 10, + messages_per_segment: 104857600, + hugegraph_url: "http://127.0.0.1:8080", + hugegraph_name: hugegraph, + hugegraph_timeout: 60 +} + +env: { + computer_home: /home/computer +} diff --git a/docker/configs/server2-conf/graphs/hugegraph.properties b/docker/configs/server2-conf/graphs/hugegraph.properties new file mode 100644 index 0000000000..532b11f209 --- /dev/null +++ b/docker/configs/server2-conf/graphs/hugegraph.properties @@ -0,0 +1,109 @@ +# gremlin entrance to create graph +# auth config: org.apache.hugegraph.auth.HugeFactoryAuthProxy +gremlin.graph=org.apache.hugegraph.HugeFactory + +# cache config +#schema.cache_capacity=100000 +# vertex-cache default is 1000w, 10min expired +vertex.cache_type=l2 +#vertex.cache_capacity=10000000 +#vertex.cache_expire=600 +# edge-cache default is 100w, 10min expired +edge.cache_type=l2 +#edge.cache_capacity=1000000 +#edge.cache_expire=600 + + +# schema illegal name template +#schema.illegal_name_regex=\s+|~.* + +#vertex.default_label=vertex + +backend=hstore +serializer=binary + +store=hugegraph + +# pd config +pd.peers=127.0.0.1:8686,127.0.0.1:8687,127.0.0.1:8688 + +# task config +task.scheduler_type=local +task.schedule_period=10 +task.retry=0 +task.wait_timeout=10 + +# raft config +raft.mode=false +raft.path=./raft-log +raft.safe_read=true +raft.use_replicator_pipeline=true +raft.election_timeout=10000 +raft.snapshot_interval=3600 +raft.backend_threads=48 +raft.read_index_threads=8 +raft.snapshot_threads=4 +raft.snapshot_parallel_compress=false +raft.snapshot_compress_threads=4 +raft.snapshot_decompress_threads=4 +raft.read_strategy=ReadOnlyLeaseBased +raft.queue_size=16384 +raft.queue_publish_timeout=60 +raft.apply_batch=1 +raft.rpc_threads=80 +raft.rpc_connect_timeout=5000 +raft.rpc_timeout=60 +raft.install_snapshot_rpc_timeout=36000 + +# search config +search.text_analyzer=jieba +search.text_analyzer_mode=INDEX + +# rocksdb backend config +#rocksdb.data_path=/path/to/disk +#rocksdb.wal_path=/path/to/disk + + +# cassandra backend config +cassandra.host=localhost +cassandra.port=9042 +cassandra.username= +cassandra.password= +#cassandra.connect_timeout=5 +#cassandra.read_timeout=20 +#cassandra.keyspace.strategy=SimpleStrategy +#cassandra.keyspace.replication=3 + +# hbase backend config +#hbase.hosts=localhost +#hbase.port=2181 +#hbase.znode_parent=/hbase +#hbase.threads_max=64 +# IMPORTANT: recommend to modify the HBase partition number +# by the actual/env data amount & RS amount before init store +# It will influence the load speed a lot +#hbase.enable_partition=true +#hbase.vertex_partitions=10 +#hbase.edge_partitions=30 + +# mysql backend config +#jdbc.driver=com.mysql.jdbc.Driver +#jdbc.url=jdbc:mysql://127.0.0.1:3306 +#jdbc.username=root +#jdbc.password= +#jdbc.reconnect_max_times=3 +#jdbc.reconnect_interval=3 +#jdbc.ssl_mode=false + +# postgresql & cockroachdb backend config +#jdbc.driver=org.postgresql.Driver +#jdbc.url=jdbc:postgresql://localhost:5432/ +#jdbc.username=postgres +#jdbc.password= +#jdbc.postgresql.connect_database=template1 + +# palo backend config +#palo.host=127.0.0.1 +#palo.poll_interval=10 +#palo.temp_dir=./palo-data +#palo.file_limit_size=32 diff --git a/docker/configs/server2-conf/gremlin-driver-settings.yaml b/docker/configs/server2-conf/gremlin-driver-settings.yaml new file mode 100644 index 0000000000..55f38ab97d --- /dev/null +++ b/docker/configs/server2-conf/gremlin-driver-settings.yaml @@ -0,0 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +hosts: [localhost] +port: 8182 +serializer: { + className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } +} diff --git a/docker/configs/server2-conf/gremlin-server.yaml b/docker/configs/server2-conf/gremlin-server.yaml new file mode 100644 index 0000000000..048dded559 --- /dev/null +++ b/docker/configs/server2-conf/gremlin-server.yaml @@ -0,0 +1,127 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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 and port of gremlin server, need to be consistent with host and port in rest-server.properties +host: 127.0.0.1 +port: 8182 + +# timeout in ms of gremlin query +evaluationTimeout: 30000 + +channelizer: org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer +# don't set graph at here, this happens after support for dynamically adding graph +graphs: { +} +scriptEngines: { + gremlin-groovy: { + staticImports: [ + org.opencypher.gremlin.process.traversal.CustomPredicates.*', + org.opencypher.gremlin.traversal.CustomFunctions.* + ], + plugins: { + org.apache.hugegraph.plugin.HugeGraphGremlinPlugin: {}, + org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {}, + org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: { + classImports: [ + java.lang.Math, + org.apache.hugegraph.backend.id.IdGenerator, + org.apache.hugegraph.type.define.Directions, + org.apache.hugegraph.type.define.NodeRole, + org.apache.hugegraph.masterelection.GlobalMasterInfo, + org.apache.hugegraph.util.DateUtil, + org.apache.hugegraph.traversal.algorithm.CollectionPathsTraverser, + org.apache.hugegraph.traversal.algorithm.CountTraverser, + org.apache.hugegraph.traversal.algorithm.CustomizedCrosspointsTraverser, + org.apache.hugegraph.traversal.algorithm.CustomizePathsTraverser, + org.apache.hugegraph.traversal.algorithm.FusiformSimilarityTraverser, + org.apache.hugegraph.traversal.algorithm.HugeTraverser, + org.apache.hugegraph.traversal.algorithm.JaccardSimilarTraverser, + org.apache.hugegraph.traversal.algorithm.KneighborTraverser, + org.apache.hugegraph.traversal.algorithm.KoutTraverser, + org.apache.hugegraph.traversal.algorithm.MultiNodeShortestPathTraverser, + org.apache.hugegraph.traversal.algorithm.NeighborRankTraverser, + org.apache.hugegraph.traversal.algorithm.PathsTraverser, + org.apache.hugegraph.traversal.algorithm.PersonalRankTraverser, + org.apache.hugegraph.traversal.algorithm.SameNeighborTraverser, + org.apache.hugegraph.traversal.algorithm.ShortestPathTraverser, + org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser, + org.apache.hugegraph.traversal.algorithm.SubGraphTraverser, + org.apache.hugegraph.traversal.algorithm.TemplatePathsTraverser, + org.apache.hugegraph.traversal.algorithm.steps.EdgeStep, + org.apache.hugegraph.traversal.algorithm.steps.RepeatEdgeStep, + org.apache.hugegraph.traversal.algorithm.steps.WeightedEdgeStep, + org.apache.hugegraph.traversal.optimize.ConditionP, + org.apache.hugegraph.traversal.optimize.Text, + org.apache.hugegraph.traversal.optimize.TraversalUtil, + org.opencypher.gremlin.traversal.CustomFunctions, + org.opencypher.gremlin.traversal.CustomPredicate + ], + methodImports: [ + java.lang.Math#*, + org.opencypher.gremlin.traversal.CustomPredicate#*, + org.opencypher.gremlin.traversal.CustomFunctions#* + ] + }, + org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: { + files: [scripts/empty-sample.groovy] + } + } + } +} +serializers: + - {className: org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } + } + - {className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } + } + - {className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV2d0, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } + } + - {className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } + } +metrics: { + consoleReporter: {enabled: false, interval: 180000}, + csvReporter: {enabled: false, interval: 180000, fileName: ./metrics/gremlin-server-metrics.csv}, + jmxReporter: {enabled: false}, + slf4jReporter: {enabled: false, 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 +ssl: { + enabled: false +} diff --git a/docker/configs/server2-conf/hugegraph-server.keystore b/docker/configs/server2-conf/hugegraph-server.keystore new file mode 100644 index 0000000000000000000000000000000000000000..e60c6b4c4ca066e165da3d5d880d1d780fb976fa GIT binary patch literal 1733 zcmY+Ddpy$%AIG=fE(|Ga?rAuU*g9>lOK50Vh`IC}mng;DNp@z;ZSGOxoCwvnE-uGq zDvFJhdlwG}L!yr6l3Oi0E~QnE=XpKPdCvLc^ZLGCpU?OE`Rn_}v*8^87=mZR6W|EL zEXSD}sBL@KwiMv<|GiR>0|Q((a39YG_;>@j z-2d$Da!n}8dwGrI^Jeazr<}U>@X`FvaOUzL00DKmLD@j6-U}=!sw|0~-#YB(_U&lC z;2bWbKk3MH1SjB*xD{hl9zVztK2i@k`6_a{AsjrB_*RV-5p=s7em>x9dHui`?TStC zew}Gp>C>!?6P|Te@;$LGQQ@!!h8+yzSu0*0XVnWI?$fJP2^-eKF0Cx!V*U^-{v7&A zZA)dtgq1S4RU$X4xG}fPdshqkuFQ-5jQQqNzPxSM^!`N$P^S0`-_ zX(=iHHj(PsxSFVEf0maY!V~9bRul*qF&EgQVYVAJ2g33ytqjMa`v#g3W)e>XCt&8$ z9If&8^~q8hYo?*IcbyxxCP?xwDcKHGKu(6Dd-o;A^ri$)$$tD$r(Ao8=wH@58K(W_ z@_}~?6j58xVHV?g_CpdfR*5+Z$=PkI3-MhCL^TIVk3N15Er{zpuTJWsGzsHJ%Fru! z{o15CkKJtFt}OfYy)IMcnF?&wDVLp&W7H<-_kf#+s5fv6V^)xZ{ZCw1m}vp)HD)J$SzCL@+;WnBb& zyw0C5jzAGmdy$|J5FJDV1#K%9bQ%-`3i<1bG64ledWJ>@X%o!wrg)+m{*VdL%zT>% zlRtZ8;9NEYvu)`BV9@r^_b3!Eq#=y}Xp}6cncLNk)#myqh|?Uf zu#q_2Km9KKA=C@ZP+&<}b1Iu^JHhUU?UR|!$f-I^6W-~x5qUwla8u_tX*$ZoHT<&b3|1oa%&cIWheq1!vp7}vo&|KS@csHK&>Ce4GlhAG-Q1r zmnF8Bp{++bw3liV*ab;^waVWNQ;cbFZ9VA1Y)=RD7Lm^7r6NZm?O5cBk_7eT9(@ z#V+49ncJ&NBfmTO%vM3)>L&@ogFTk>U}`zLNH-nz>fD=Q|AZrYr&Ek8yxr5%1lJq$ zuMC8=D>7uEsuqvT5>#cyV1BMNg~w2vHB1buzv1(+;CD=JxXaDf`~hox#GZLq(_uo9 zrPofrOMz?k<-#fe_p&8jfMHP2SZt({*B$Grc^_|u%?x?dy@TIK@fTrtVsZ%qKVGz? zJ(&Vd#8Db?$uzt1l<{UG^LdhGlfFhen!o3hw%YK(kA|3QKO|X^MHcRGJK?XP)O(z- z^uo_Ssjc@571 literal 0 HcmV?d00001 diff --git a/docker/configs/server2-conf/log4j2.xml b/docker/configs/server2-conf/log4j2.xml new file mode 100644 index 0000000000..f1dd7e8395 --- /dev/null +++ b/docker/configs/server2-conf/log4j2.xml @@ -0,0 +1,144 @@ + + + + + + logs + hugegraph-server + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docker/configs/server2-conf/remote-objects.yaml b/docker/configs/server2-conf/remote-objects.yaml new file mode 100644 index 0000000000..39679d8c30 --- /dev/null +++ b/docker/configs/server2-conf/remote-objects.yaml @@ -0,0 +1,30 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +hosts: [localhost] +port: 8182 +serializer: { + className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, + config: { + serializeResultToString: false, + # The duplication of HugeGraphIoRegistry is meant to fix a bug in the + # 'org.apache.tinkerpop.gremlin.driver.Settings:from(Configuration)' method. + ioRegistries: [ + org.apache.hugegraph.io.HugeGraphIoRegistry, + org.apache.hugegraph.io.HugeGraphIoRegistry + ] + } +} diff --git a/docker/configs/server2-conf/remote.yaml b/docker/configs/server2-conf/remote.yaml new file mode 100644 index 0000000000..55f38ab97d --- /dev/null +++ b/docker/configs/server2-conf/remote.yaml @@ -0,0 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +hosts: [localhost] +port: 8182 +serializer: { + className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } +} diff --git a/docker/configs/server2-conf/rest-server.properties b/docker/configs/server2-conf/rest-server.properties new file mode 100644 index 0000000000..b4e128360b --- /dev/null +++ b/docker/configs/server2-conf/rest-server.properties @@ -0,0 +1,53 @@ +# bind url +restserver.url=http://127.0.0.1:8082 +# gremlin server url, need to be consistent with host and port in gremlin-server.yaml +gremlinserver.url=http://127.0.0.1:8182 + +graphs=./conf/graphs + +# The maximum thread ratio for batch writing, only take effect if the batch.max_write_threads is 0 +batch.max_write_ratio=80 +batch.max_write_threads=0 + +# configuration of arthas +arthas.telnet_port=8572 +arthas.http_port=8571 +arthas.ip=127.0.0.1 +arthas.disabled_commands=jad + +# authentication configs +# choose 'org.apache.hugegraph.auth.StandardAuthenticator' or +# 'org.apache.hugegraph.auth.ConfigAuthenticator' +#auth.authenticator= + +# for StandardAuthenticator mode +#auth.graph_store=hugegraph +# auth client config +#auth.remote_url=127.0.0.1:8899,127.0.0.1:8898,127.0.0.1:8897 + +# for ConfigAuthenticator mode +#auth.admin_token= +#auth.user_tokens=[] + +# rpc server configs for multi graph-servers or raft-servers +rpc.server_host=127.0.0.1 +rpc.server_port=8092 +#rpc.server_timeout=30 + +# rpc client configs (like enable to keep cache consistency) +#rpc.remote_url=127.0.0.1:8091,127.0.0.1:8092,127.0.0.1:8093 +#rpc.client_connect_timeout=20 +#rpc.client_reconnect_period=10 +#rpc.client_read_timeout=40 +#rpc.client_retries=3 +#rpc.client_load_balancer=consistentHash + +# raft group initial peers +#raft.group_peers=127.0.0.1:8091,127.0.0.1:8092,127.0.0.1:8093 + +# lightweight load balancing (beta) +server.id=server-2 +server.role=worker + +# slow query log +log.slow_query_threshold=1000 diff --git a/docker/configs/server3-conf/computer.yaml b/docker/configs/server3-conf/computer.yaml new file mode 100644 index 0000000000..1c69388bb0 --- /dev/null +++ b/docker/configs/server3-conf/computer.yaml @@ -0,0 +1,39 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +# common parameters +common: { + worker_heap: 10000, + vertex_input_dir: /data, + workers: 51, + zookeeper_list: "127.0.0.1:2181", + max_edges_per_segment: 10485760, + edges_immutable: true, + partitions: 255, + compute_threads: 5, + input_threads: 5, + message_async: false, + message_queue_size: 1000, + message_send_threads: 10, + messages_per_segment: 104857600, + hugegraph_url: "http://127.0.0.1:8080", + hugegraph_name: hugegraph, + hugegraph_timeout: 60 +} + +env: { + computer_home: /home/computer +} diff --git a/docker/configs/server3-conf/graphs/hugegraph.properties b/docker/configs/server3-conf/graphs/hugegraph.properties new file mode 100644 index 0000000000..532b11f209 --- /dev/null +++ b/docker/configs/server3-conf/graphs/hugegraph.properties @@ -0,0 +1,109 @@ +# gremlin entrance to create graph +# auth config: org.apache.hugegraph.auth.HugeFactoryAuthProxy +gremlin.graph=org.apache.hugegraph.HugeFactory + +# cache config +#schema.cache_capacity=100000 +# vertex-cache default is 1000w, 10min expired +vertex.cache_type=l2 +#vertex.cache_capacity=10000000 +#vertex.cache_expire=600 +# edge-cache default is 100w, 10min expired +edge.cache_type=l2 +#edge.cache_capacity=1000000 +#edge.cache_expire=600 + + +# schema illegal name template +#schema.illegal_name_regex=\s+|~.* + +#vertex.default_label=vertex + +backend=hstore +serializer=binary + +store=hugegraph + +# pd config +pd.peers=127.0.0.1:8686,127.0.0.1:8687,127.0.0.1:8688 + +# task config +task.scheduler_type=local +task.schedule_period=10 +task.retry=0 +task.wait_timeout=10 + +# raft config +raft.mode=false +raft.path=./raft-log +raft.safe_read=true +raft.use_replicator_pipeline=true +raft.election_timeout=10000 +raft.snapshot_interval=3600 +raft.backend_threads=48 +raft.read_index_threads=8 +raft.snapshot_threads=4 +raft.snapshot_parallel_compress=false +raft.snapshot_compress_threads=4 +raft.snapshot_decompress_threads=4 +raft.read_strategy=ReadOnlyLeaseBased +raft.queue_size=16384 +raft.queue_publish_timeout=60 +raft.apply_batch=1 +raft.rpc_threads=80 +raft.rpc_connect_timeout=5000 +raft.rpc_timeout=60 +raft.install_snapshot_rpc_timeout=36000 + +# search config +search.text_analyzer=jieba +search.text_analyzer_mode=INDEX + +# rocksdb backend config +#rocksdb.data_path=/path/to/disk +#rocksdb.wal_path=/path/to/disk + + +# cassandra backend config +cassandra.host=localhost +cassandra.port=9042 +cassandra.username= +cassandra.password= +#cassandra.connect_timeout=5 +#cassandra.read_timeout=20 +#cassandra.keyspace.strategy=SimpleStrategy +#cassandra.keyspace.replication=3 + +# hbase backend config +#hbase.hosts=localhost +#hbase.port=2181 +#hbase.znode_parent=/hbase +#hbase.threads_max=64 +# IMPORTANT: recommend to modify the HBase partition number +# by the actual/env data amount & RS amount before init store +# It will influence the load speed a lot +#hbase.enable_partition=true +#hbase.vertex_partitions=10 +#hbase.edge_partitions=30 + +# mysql backend config +#jdbc.driver=com.mysql.jdbc.Driver +#jdbc.url=jdbc:mysql://127.0.0.1:3306 +#jdbc.username=root +#jdbc.password= +#jdbc.reconnect_max_times=3 +#jdbc.reconnect_interval=3 +#jdbc.ssl_mode=false + +# postgresql & cockroachdb backend config +#jdbc.driver=org.postgresql.Driver +#jdbc.url=jdbc:postgresql://localhost:5432/ +#jdbc.username=postgres +#jdbc.password= +#jdbc.postgresql.connect_database=template1 + +# palo backend config +#palo.host=127.0.0.1 +#palo.poll_interval=10 +#palo.temp_dir=./palo-data +#palo.file_limit_size=32 diff --git a/docker/configs/server3-conf/gremlin-driver-settings.yaml b/docker/configs/server3-conf/gremlin-driver-settings.yaml new file mode 100644 index 0000000000..00ef046699 --- /dev/null +++ b/docker/configs/server3-conf/gremlin-driver-settings.yaml @@ -0,0 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +hosts: [localhost] +port: 8183 +serializer: { + className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } +} diff --git a/docker/configs/server3-conf/gremlin-server.yaml b/docker/configs/server3-conf/gremlin-server.yaml new file mode 100644 index 0000000000..e153926bc9 --- /dev/null +++ b/docker/configs/server3-conf/gremlin-server.yaml @@ -0,0 +1,127 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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 and port of gremlin server, need to be consistent with host and port in rest-server.properties +host: 127.0.0.1 +port: 8183 + +# timeout in ms of gremlin query +evaluationTimeout: 30000 + +channelizer: org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer +# don't set graph at here, this happens after support for dynamically adding graph +graphs: { +} +scriptEngines: { + gremlin-groovy: { + staticImports: [ + org.opencypher.gremlin.process.traversal.CustomPredicates.*', + org.opencypher.gremlin.traversal.CustomFunctions.* + ], + plugins: { + org.apache.hugegraph.plugin.HugeGraphGremlinPlugin: {}, + org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {}, + org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: { + classImports: [ + java.lang.Math, + org.apache.hugegraph.backend.id.IdGenerator, + org.apache.hugegraph.type.define.Directions, + org.apache.hugegraph.type.define.NodeRole, + org.apache.hugegraph.masterelection.GlobalMasterInfo, + org.apache.hugegraph.util.DateUtil, + org.apache.hugegraph.traversal.algorithm.CollectionPathsTraverser, + org.apache.hugegraph.traversal.algorithm.CountTraverser, + org.apache.hugegraph.traversal.algorithm.CustomizedCrosspointsTraverser, + org.apache.hugegraph.traversal.algorithm.CustomizePathsTraverser, + org.apache.hugegraph.traversal.algorithm.FusiformSimilarityTraverser, + org.apache.hugegraph.traversal.algorithm.HugeTraverser, + org.apache.hugegraph.traversal.algorithm.JaccardSimilarTraverser, + org.apache.hugegraph.traversal.algorithm.KneighborTraverser, + org.apache.hugegraph.traversal.algorithm.KoutTraverser, + org.apache.hugegraph.traversal.algorithm.MultiNodeShortestPathTraverser, + org.apache.hugegraph.traversal.algorithm.NeighborRankTraverser, + org.apache.hugegraph.traversal.algorithm.PathsTraverser, + org.apache.hugegraph.traversal.algorithm.PersonalRankTraverser, + org.apache.hugegraph.traversal.algorithm.SameNeighborTraverser, + org.apache.hugegraph.traversal.algorithm.ShortestPathTraverser, + org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser, + org.apache.hugegraph.traversal.algorithm.SubGraphTraverser, + org.apache.hugegraph.traversal.algorithm.TemplatePathsTraverser, + org.apache.hugegraph.traversal.algorithm.steps.EdgeStep, + org.apache.hugegraph.traversal.algorithm.steps.RepeatEdgeStep, + org.apache.hugegraph.traversal.algorithm.steps.WeightedEdgeStep, + org.apache.hugegraph.traversal.optimize.ConditionP, + org.apache.hugegraph.traversal.optimize.Text, + org.apache.hugegraph.traversal.optimize.TraversalUtil, + org.opencypher.gremlin.traversal.CustomFunctions, + org.opencypher.gremlin.traversal.CustomPredicate + ], + methodImports: [ + java.lang.Math#*, + org.opencypher.gremlin.traversal.CustomPredicate#*, + org.opencypher.gremlin.traversal.CustomFunctions#* + ] + }, + org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: { + files: [scripts/empty-sample.groovy] + } + } + } +} +serializers: + - {className: org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } + } + - {className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } + } + - {className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV2d0, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } + } + - {className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } + } +metrics: { + consoleReporter: {enabled: false, interval: 180000}, + csvReporter: {enabled: false, interval: 180000, fileName: ./metrics/gremlin-server-metrics.csv}, + jmxReporter: {enabled: false}, + slf4jReporter: {enabled: false, 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 +ssl: { + enabled: false +} diff --git a/docker/configs/server3-conf/hugegraph-server.keystore b/docker/configs/server3-conf/hugegraph-server.keystore new file mode 100644 index 0000000000000000000000000000000000000000..e60c6b4c4ca066e165da3d5d880d1d780fb976fa GIT binary patch literal 1733 zcmY+Ddpy$%AIG=fE(|Ga?rAuU*g9>lOK50Vh`IC}mng;DNp@z;ZSGOxoCwvnE-uGq zDvFJhdlwG}L!yr6l3Oi0E~QnE=XpKPdCvLc^ZLGCpU?OE`Rn_}v*8^87=mZR6W|EL zEXSD}sBL@KwiMv<|GiR>0|Q((a39YG_;>@j z-2d$Da!n}8dwGrI^Jeazr<}U>@X`FvaOUzL00DKmLD@j6-U}=!sw|0~-#YB(_U&lC z;2bWbKk3MH1SjB*xD{hl9zVztK2i@k`6_a{AsjrB_*RV-5p=s7em>x9dHui`?TStC zew}Gp>C>!?6P|Te@;$LGQQ@!!h8+yzSu0*0XVnWI?$fJP2^-eKF0Cx!V*U^-{v7&A zZA)dtgq1S4RU$X4xG}fPdshqkuFQ-5jQQqNzPxSM^!`N$P^S0`-_ zX(=iHHj(PsxSFVEf0maY!V~9bRul*qF&EgQVYVAJ2g33ytqjMa`v#g3W)e>XCt&8$ z9If&8^~q8hYo?*IcbyxxCP?xwDcKHGKu(6Dd-o;A^ri$)$$tD$r(Ao8=wH@58K(W_ z@_}~?6j58xVHV?g_CpdfR*5+Z$=PkI3-MhCL^TIVk3N15Er{zpuTJWsGzsHJ%Fru! z{o15CkKJtFt}OfYy)IMcnF?&wDVLp&W7H<-_kf#+s5fv6V^)xZ{ZCw1m}vp)HD)J$SzCL@+;WnBb& zyw0C5jzAGmdy$|J5FJDV1#K%9bQ%-`3i<1bG64ledWJ>@X%o!wrg)+m{*VdL%zT>% zlRtZ8;9NEYvu)`BV9@r^_b3!Eq#=y}Xp}6cncLNk)#myqh|?Uf zu#q_2Km9KKA=C@ZP+&<}b1Iu^JHhUU?UR|!$f-I^6W-~x5qUwla8u_tX*$ZoHT<&b3|1oa%&cIWheq1!vp7}vo&|KS@csHK&>Ce4GlhAG-Q1r zmnF8Bp{++bw3liV*ab;^waVWNQ;cbFZ9VA1Y)=RD7Lm^7r6NZm?O5cBk_7eT9(@ z#V+49ncJ&NBfmTO%vM3)>L&@ogFTk>U}`zLNH-nz>fD=Q|AZrYr&Ek8yxr5%1lJq$ zuMC8=D>7uEsuqvT5>#cyV1BMNg~w2vHB1buzv1(+;CD=JxXaDf`~hox#GZLq(_uo9 zrPofrOMz?k<-#fe_p&8jfMHP2SZt({*B$Grc^_|u%?x?dy@TIK@fTrtVsZ%qKVGz? zJ(&Vd#8Db?$uzt1l<{UG^LdhGlfFhen!o3hw%YK(kA|3QKO|X^MHcRGJK?XP)O(z- z^uo_Ssjc@571 literal 0 HcmV?d00001 diff --git a/docker/configs/server3-conf/log4j2.xml b/docker/configs/server3-conf/log4j2.xml new file mode 100644 index 0000000000..f1dd7e8395 --- /dev/null +++ b/docker/configs/server3-conf/log4j2.xml @@ -0,0 +1,144 @@ + + + + + + logs + hugegraph-server + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docker/configs/server3-conf/remote-objects.yaml b/docker/configs/server3-conf/remote-objects.yaml new file mode 100644 index 0000000000..ce99fcb2f6 --- /dev/null +++ b/docker/configs/server3-conf/remote-objects.yaml @@ -0,0 +1,30 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +hosts: [localhost] +port: 8183 +serializer: { + className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, + config: { + serializeResultToString: false, + # The duplication of HugeGraphIoRegistry is meant to fix a bug in the + # 'org.apache.tinkerpop.gremlin.driver.Settings:from(Configuration)' method. + ioRegistries: [ + org.apache.hugegraph.io.HugeGraphIoRegistry, + org.apache.hugegraph.io.HugeGraphIoRegistry + ] + } +} diff --git a/docker/configs/server3-conf/remote.yaml b/docker/configs/server3-conf/remote.yaml new file mode 100644 index 0000000000..00ef046699 --- /dev/null +++ b/docker/configs/server3-conf/remote.yaml @@ -0,0 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +hosts: [localhost] +port: 8183 +serializer: { + className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, + config: { + serializeResultToString: false, + ioRegistries: [org.apache.hugegraph.io.HugeGraphIoRegistry] + } +} diff --git a/docker/configs/server3-conf/rest-server.properties b/docker/configs/server3-conf/rest-server.properties new file mode 100644 index 0000000000..79fcee6fed --- /dev/null +++ b/docker/configs/server3-conf/rest-server.properties @@ -0,0 +1,53 @@ +# bind url +restserver.url=http://127.0.0.1:8083 +# gremlin server url, need to be consistent with host and port in gremlin-server.yaml +gremlinserver.url=http://127.0.0.1:8183 + +graphs=./conf/graphs + +# The maximum thread ratio for batch writing, only take effect if the batch.max_write_threads is 0 +batch.max_write_ratio=80 +batch.max_write_threads=0 + +# configuration of arthas +arthas.telnet_port=8582 +arthas.http_port=8581 +arthas.ip=127.0.0.1 +arthas.disabled_commands=jad + +# authentication configs +# choose 'org.apache.hugegraph.auth.StandardAuthenticator' or +# 'org.apache.hugegraph.auth.ConfigAuthenticator' +#auth.authenticator= + +# for StandardAuthenticator mode +#auth.graph_store=hugegraph +# auth client config +#auth.remote_url=127.0.0.1:8899,127.0.0.1:8898,127.0.0.1:8897 + +# for ConfigAuthenticator mode +#auth.admin_token= +#auth.user_tokens=[] + +# rpc server configs for multi graph-servers or raft-servers +rpc.server_host=127.0.0.1 +rpc.server_port=8093 +#rpc.server_timeout=30 + +# rpc client configs (like enable to keep cache consistency) +#rpc.remote_url=127.0.0.1:8091,127.0.0.1:8092,127.0.0.1:8093 +#rpc.client_connect_timeout=20 +#rpc.client_reconnect_period=10 +#rpc.client_read_timeout=40 +#rpc.client_retries=3 +#rpc.client_load_balancer=consistentHash + +# raft group initial peers +#raft.group_peers=127.0.0.1:8091,127.0.0.1:8092,127.0.0.1:8093 + +# lightweight load balancing (beta) +server.id=server-3 +server.role=worker + +# slow query log +log.slow_query_threshold=1000 diff --git a/docker/docker-compose.3pd-3store-3server.yml b/docker/docker-compose.3pd-3store-3server.yml new file mode 100644 index 0000000000..0dd756468b --- /dev/null +++ b/docker/docker-compose.3pd-3store-3server.yml @@ -0,0 +1,178 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# + +version: "3" + +services: + pd0: + image: hugegraph/pd + container_name: pd0 + hostname: pd0 + network_mode: host + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8620"] + interval: 10s + timeout: 5s + retries: 3 + volumes: + - ./configs/application-pd0.yml:/hugegraph-pd/conf/application.yml + + pd1: + image: hugegraph/pd + container_name: pd1 + hostname: pd1 + network_mode: host + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8621"] + interval: 10s + timeout: 5s + retries: 3 + volumes: + - ./configs/application-pd1.yml:/hugegraph-pd/conf/application.yml + + pd2: + image: hugegraph/pd + container_name: pd2 + hostname: pd2 + network_mode: host + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8622"] + interval: 10s + timeout: 5s + retries: 3 + volumes: + - ./configs/application-pd2.yml:/hugegraph-pd/conf/application.yml + + store0: + image: hugegraph/store + container_name: store0 + hostname: store0 + network_mode: host + depends_on: + pd0: + condition: service_healthy + pd1: + condition: service_healthy + pd2: + condition: service_healthy + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8520"] + interval: 10s + timeout: 5s + retries: 3 + volumes: + - ./configs/application-store0.yml:/hugegraph-store/conf/application.yml + + store1: + image: hugegraph/store + container_name: store1 + hostname: store1 + network_mode: host + depends_on: + pd0: + condition: service_healthy + pd1: + condition: service_healthy + pd2: + condition: service_healthy + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8521"] + interval: 10s + timeout: 5s + retries: 3 + volumes: + - ./configs/application-store1.yml:/hugegraph-store/conf/application.yml + + store2: + image: hugegraph/store + container_name: store2 + hostname: store2 + network_mode: host + depends_on: + pd0: + condition: service_healthy + pd1: + condition: service_healthy + pd2: + condition: service_healthy + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8522"] + interval: 10s + timeout: 5s + retries: 3 + volumes: + - ./configs/application-store2.yml:/hugegraph-store/conf/application.yml + + server1: + image: hugegraph/server + container_name: server1 + hostname: server1 + network_mode: host + depends_on: + store0: + condition: service_healthy + store1: + condition: service_healthy + store2: + condition: service_healthy + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8081"] + interval: 10s + timeout: 5s + retries: 3 + volumes: + - ./configs/server1-conf:/hugegraph-server/conf + + server2: + image: hugegraph/server + container_name: server2 + hostname: server2 + network_mode: host + depends_on: + store0: + condition: service_healthy + store1: + condition: service_healthy + store2: + condition: service_healthy + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8082"] + interval: 10s + timeout: 5s + retries: 3 + volumes: + - ./configs/server2-conf:/hugegraph-server/conf + + server3: + image: hugegraph/server + container_name: server3 + hostname: server3 + network_mode: host + depends_on: + store0: + condition: service_healthy + store1: + condition: service_healthy + store2: + condition: service_healthy + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8083"] + interval: 10s + timeout: 5s + retries: 3 + volumes: + - ./configs/server3-conf:/hugegraph-server/conf diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 0000000000..0c90c1e451 --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,58 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# + +version: "3" + +services: + pd: + image: hugegraph/pd + container_name: pd + hostname: pd + network_mode: host + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8620"] + interval: 10s + timeout: 5s + retries: 3 + + store: + image: hugegraph/store + container_name: store + hostname: store + network_mode: host + depends_on: + pd: + condition: service_healthy + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8520"] + interval: 10s + timeout: 5s + retries: 3 + + server: + image: hugegraph/server + container_name: server + hostname: server + network_mode: host + depends_on: + store: + condition: service_healthy + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080"] + interval: 10s + timeout: 5s + retries: 3 From 77f8d1e7ec368f6819cff9883af926e3953ef1c9 Mon Sep 17 00:00:00 2001 From: VGalaxies Date: Fri, 26 Apr 2024 11:12:12 +0800 Subject: [PATCH 06/11] fix review --- hugegraph-server/hugegraph-dist/docker/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hugegraph-server/hugegraph-dist/docker/README.md b/hugegraph-server/hugegraph-dist/docker/README.md index 00cf3d638e..69df6b43ce 100644 --- a/hugegraph-server/hugegraph-dist/docker/README.md +++ b/hugegraph-server/hugegraph-dist/docker/README.md @@ -35,7 +35,7 @@ If you want to customize the preloaded data, please mount the groovy scripts (no 1. Using docker run - Use `docker run -itd --name=graph -p 8080:8080 -e PRELOAD=true -v /absolute/path/to/your/script:/hugegraph-server/scripts/example.groovy hugegraph/hugegraph` + Use `docker run -itd --name=graph -p 8080:8080 -e PRELOAD=true -v /path/to/script:/hugegraph-server/scripts/example.groovy hugegraph/hugegraph` to start hugegraph server. 2. Using docker compose @@ -50,7 +50,7 @@ If you want to customize the preloaded data, please mount the groovy scripts (no environment: - PRELOAD=true volumes: - - /absolute/path/to/your/script:/hugegraph-server/scripts/example.groovy + - /path/to/script:/hugegraph-server/scripts/example.groovy ports: - 8080:8080 ``` From 6b4186500ec6ad0ff255f10816e5e76708f3060d Mon Sep 17 00:00:00 2001 From: VGalaxies Date: Wed, 15 May 2024 20:56:39 +0800 Subject: [PATCH 07/11] remove CJK comments --- docker/configs/application-pd0.yml | 15 --------------- docker/configs/application-pd1.yml | 15 --------------- docker/configs/application-pd2.yml | 15 --------------- docker/configs/application-store0.yml | 7 ------- docker/configs/application-store1.yml | 7 ------- docker/configs/application-store2.yml | 7 ------- 6 files changed, 66 deletions(-) diff --git a/docker/configs/application-pd0.yml b/docker/configs/application-pd0.yml index 40436fe3c2..6531cbafb2 100644 --- a/docker/configs/application-pd0.yml +++ b/docker/configs/application-pd0.yml @@ -36,43 +36,28 @@ license: license-path: ./conf/hugegraph.license grpc: port: 8686 - # grpc 的服务地址,部署时需要改为本地实际 IPv4 地址 host: 127.0.0.1 server: - # rest 服务端口号 port: 8620 pd: - # 存储路径 data-path: ./pd_data - # 自动扩容的检查周期,定时检查每个 store 的分区数量,自动进行分区数量平衡 patrol-interval: 1800 - # 初始 store 列表,在列表内的 store 自动激活 initial-store-count: 3 - # grpc IP:grpc port initial-store-list: 127.0.0.1:8500,127.0.0.1:8501,127.0.0.1:8502 raft: - # 本机 raft 服务地址 address: 127.0.0.1:8610 - # pd 集群服务地址 peers-list: 127.0.0.1:8610,127.0.0.1:8611,127.0.0.1:8612 store: - # store 下线时间。超过该时间,认为 store 永久不可用,分配副本到其他机器,单位秒 max-down-time: 172800 - # 是否开启 store 监控数据存储 monitor_data_enabled: true - # 监控数据的间隔,minute (默认), hour, second - # default: 1 min * 1 day = 1440 monitor_data_interval: 1 minute - # 监控数据的保留时间 1 天; day, month, year monitor_data_retention: 1 day initial-store-count: 1 partition: - # 默认每个分区副本数 default-shard-count: 1 - # 默认每机器最大副本数,初始分区数 = store-max-shard-count * store-number / default-shard-count store-max-shard-count: 12 diff --git a/docker/configs/application-pd1.yml b/docker/configs/application-pd1.yml index 41d86e181b..0cf9f54297 100644 --- a/docker/configs/application-pd1.yml +++ b/docker/configs/application-pd1.yml @@ -36,43 +36,28 @@ license: license-path: ./conf/hugegraph.license grpc: port: 8687 - # grpc 的服务地址,部署时需要改为本地实际 IPv4 地址 host: 127.0.0.1 server: - # rest 服务端口号 port: 8621 pd: - # 存储路径 data-path: ./pd_data - # 自动扩容的检查周期,定时检查每个 store 的分区数量,自动进行分区数量平衡 patrol-interval: 1800 - # 初始 store 列表,在列表内的 store 自动激活 initial-store-count: 3 - # grpc IP:grpc port initial-store-list: 127.0.0.1:8500,127.0.0.1:8501,127.0.0.1:8502 raft: - # 本机 raft 服务地址 address: 127.0.0.1:8611 - # pd 集群服务地址 peers-list: 127.0.0.1:8610,127.0.0.1:8611,127.0.0.1:8612 store: - # store 下线时间。超过该时间,认为 store 永久不可用,分配副本到其他机器,单位秒 max-down-time: 172800 - # 是否开启 store 监控数据存储 monitor_data_enabled: true - # 监控数据的间隔,minute (默认), hour, second - # default: 1 min * 1 day = 1440 monitor_data_interval: 1 minute - # 监控数据的保留时间 1 天; day, month, year monitor_data_retention: 1 day initial-store-count: 1 partition: - # 默认每个分区副本数 default-shard-count: 1 - # 默认每机器最大副本数,初始分区数 = store-max-shard-count * store-number / default-shard-count store-max-shard-count: 12 diff --git a/docker/configs/application-pd2.yml b/docker/configs/application-pd2.yml index 91b2197c62..a0d2c79ea3 100644 --- a/docker/configs/application-pd2.yml +++ b/docker/configs/application-pd2.yml @@ -36,43 +36,28 @@ license: license-path: ./conf/hugegraph.license grpc: port: 8688 - # grpc 的服务地址,部署时需要改为本地实际 IPv4 地址 host: 127.0.0.1 server: - # rest 服务端口号 port: 8622 pd: - # 存储路径 data-path: ./pd_data - # 自动扩容的检查周期,定时检查每个 store 的分区数量,自动进行分区数量平衡 patrol-interval: 1800 - # 初始 store 列表,在列表内的 store 自动激活 initial-store-count: 3 - # grpc IP:grpc port initial-store-list: 127.0.0.1:8500,127.0.0.1:8501,127.0.0.1:8502 raft: - # 本机 raft 服务地址 address: 127.0.0.1:8612 - # pd 集群服务地址 peers-list: 127.0.0.1:8610,127.0.0.1:8611,127.0.0.1:8612 store: - # store 下线时间。超过该时间,认为 store 永久不可用,分配副本到其他机器,单位秒 max-down-time: 172800 - # 是否开启 store 监控数据存储 monitor_data_enabled: true - # 监控数据的间隔,minute (默认), hour, second - # default: 1 min * 1 day = 1440 monitor_data_interval: 1 minute - # 监控数据的保留时间 1 天; day, month, year monitor_data_retention: 1 day initial-store-count: 1 partition: - # 默认每个分区副本数 default-shard-count: 1 - # 默认每机器最大副本数,初始分区数 = store-max-shard-count * store-number / default-shard-count store-max-shard-count: 12 diff --git a/docker/configs/application-store0.yml b/docker/configs/application-store0.yml index 75b743c2a3..d093f1bfbd 100644 --- a/docker/configs/application-store0.yml +++ b/docker/configs/application-store0.yml @@ -16,7 +16,6 @@ # pdserver: - # pd 服务地址,多个 pd 地址用逗号分割 address: 127.0.0.1:8686,127.0.0.1:8687,127.0.0.1:8688 management: @@ -30,26 +29,20 @@ management: include: "*" grpc: - # grpc 的服务地址 host: 127.0.0.1 port: 8500 netty-server: max-inbound-message-size: 1000MB raft: - # raft 缓存队列大小 disruptorBufferSize: 1024 address: 127.0.0.1:8510 max-log-file-size: 600000000000 - # 快照生成时间间隔,单位秒 snapshotInterval: 1800 server: - # rest 服务地址 port: 8520 app: - # 存储路径,支持多个路径,逗号分割 data-path: ./storage - #raft-path: ./storage spring: application: diff --git a/docker/configs/application-store1.yml b/docker/configs/application-store1.yml index e4b2824ff9..0aeba62cf6 100644 --- a/docker/configs/application-store1.yml +++ b/docker/configs/application-store1.yml @@ -16,7 +16,6 @@ # pdserver: - # pd 服务地址,多个 pd 地址用逗号分割 address: 127.0.0.1:8686,127.0.0.1:8687,127.0.0.1:8688 management: @@ -30,26 +29,20 @@ management: include: "*" grpc: - # grpc 的服务地址 host: 127.0.0.1 port: 8501 netty-server: max-inbound-message-size: 1000MB raft: - # raft 缓存队列大小 disruptorBufferSize: 1024 address: 127.0.0.1:8511 max-log-file-size: 600000000000 - # 快照生成时间间隔,单位秒 snapshotInterval: 1800 server: - # rest 服务地址 port: 8521 app: - # 存储路径,支持多个路径,逗号分割 data-path: ./storage - #raft-path: ./storage spring: application: diff --git a/docker/configs/application-store2.yml b/docker/configs/application-store2.yml index 324327cea7..e18dc62a3c 100644 --- a/docker/configs/application-store2.yml +++ b/docker/configs/application-store2.yml @@ -16,7 +16,6 @@ # pdserver: - # pd 服务地址,多个 pd 地址用逗号分割 address: 127.0.0.1:8686,127.0.0.1:8687,127.0.0.1:8688 management: @@ -30,26 +29,20 @@ management: include: "*" grpc: - # grpc 的服务地址 host: 127.0.0.1 port: 8502 netty-server: max-inbound-message-size: 1000MB raft: - # raft 缓存队列大小 disruptorBufferSize: 1024 address: 127.0.0.1:8512 max-log-file-size: 600000000000 - # 快照生成时间间隔,单位秒 snapshotInterval: 1800 server: - # rest 服务地址 port: 8522 app: - # 存储路径,支持多个路径,逗号分割 data-path: ./storage - #raft-path: ./storage spring: application: From 6c63b91ffb3283e4641d241dab3a7c020e7f1161 Mon Sep 17 00:00:00 2001 From: imbajin Date: Fri, 17 May 2024 16:24:11 +0800 Subject: [PATCH 08/11] chore: delete some useless files/configs --- .github/PULL_REQUEST_TEMPLATE.md | 4 +- .github/workflows/stale.yml | 2 +- BUILDING.md | 37 ++- CONTRIBUTING.md | 24 +- docker/configs/server1-conf/computer.yaml | 39 ---- .../server1-conf/graphs/hugegraph.properties | 92 +------- .../server1-conf/hugegraph-server.keystore | Bin 1733 -> 0 bytes .../server1-conf/rest-server.properties | 25 -- docker/configs/server2-conf/computer.yaml | 39 ---- .../server2-conf/graphs/hugegraph.properties | 92 +------- .../server2-conf/hugegraph-server.keystore | Bin 1733 -> 0 bytes .../server2-conf/rest-server.properties | 27 --- docker/configs/server3-conf/computer.yaml | 39 ---- .../server3-conf/graphs/hugegraph.properties | 92 +------- .../server3-conf/hugegraph-server.keystore | Bin 1733 -> 0 bytes .../server3-conf/rest-server.properties | 28 --- ... => docker-compose-3pd-3store-3server.yml} | 2 + .../static/conf/rest-server.properties | 37 +-- hugegraph-store/LICENSE | 216 ------------------ hugegraph-store/NOTICE | 7 - 20 files changed, 46 insertions(+), 756 deletions(-) delete mode 100644 docker/configs/server1-conf/computer.yaml delete mode 100644 docker/configs/server1-conf/hugegraph-server.keystore delete mode 100644 docker/configs/server2-conf/computer.yaml delete mode 100644 docker/configs/server2-conf/hugegraph-server.keystore delete mode 100644 docker/configs/server3-conf/computer.yaml delete mode 100644 docker/configs/server3-conf/hugegraph-server.keystore rename docker/{docker-compose.3pd-3store-3server.yml => docker-compose-3pd-3store-3server.yml} (97%) delete mode 100644 hugegraph-store/LICENSE delete mode 100644 hugegraph-store/NOTICE diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c71e5e4a6a..fbc6994ee3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -19,7 +19,7 @@ published) ## Purpose of the PR -- close #xxx +- close #xxx