From 1596ff6a85d547f6346092820eb5a4ab7492bdc0 Mon Sep 17 00:00:00 2001 From: Tsukilc <153273766+Tsukilc@users.noreply.github.com> Date: Mon, 19 Jan 2026 15:32:44 +0800 Subject: [PATCH 01/12] fix: fix graphs.md --- content/cn/docs/clients/restful-api/graphs.md | 14 +++++++++----- content/en/docs/clients/restful-api/graphs.md | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/content/cn/docs/clients/restful-api/graphs.md b/content/cn/docs/clients/restful-api/graphs.md index 5229a9432..f6179b3d5 100644 --- a/content/cn/docs/clients/restful-api/graphs.md +++ b/content/cn/docs/clients/restful-api/graphs.md @@ -112,7 +112,7 @@ DELETE http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/clear?confirm_ ##### Method & Url ``` -POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph_clone?clone_graph_name=hugegraph +POST http://localhost:8080/graphspaces/DEFAULT/graphs/cloneGraph?clone_graph_name=hugegraph ``` ##### Request Body (可选) @@ -124,7 +124,7 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph_clone?clone_grap "gremlin.graph": "org.apache.hugegraph.HugeFactory", "backend": "rocksdb", "serializer": "binary", - "store": "hugegraph_clone", + "store": "cloneGraph", "rocksdb.data_path": "./rks-data-xx", "rocksdb.wal_path": "./rks-data-xx" } @@ -144,7 +144,9 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph_clone?clone_grap ```javascript { - "name": "hugegraph_clone", + "name" +: + "cloneGraph", "backend": "rocksdb" } ``` @@ -167,6 +169,7 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph-xx ##### Request Body 创建一个非鉴权模式的图(设置 `Content-Type: application/json`) +**注意**!!1.7.0 及之前,如果 backend 是 hstore,必须在请求体加上 "task.scheduler_type": "distributed" ```json { @@ -216,7 +219,8 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph-xx ##### Method & Url ```javascript -DELETE http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph_clone?confirm_message=I%27m%20sure%20to%20drop%20the%20graph +DELETE +http://localhost:8080/graphspaces/DEFAULT/graphs/graphA?confirm_message=I%27m%20sure%20to%20drop%20the%20graph ``` ##### Response Status @@ -486,4 +490,4 @@ PUT http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/compact "local": "OK" } } -``` +``` \ No newline at end of file diff --git a/content/en/docs/clients/restful-api/graphs.md b/content/en/docs/clients/restful-api/graphs.md index 913d8ae2a..3257efbd4 100644 --- a/content/en/docs/clients/restful-api/graphs.md +++ b/content/en/docs/clients/restful-api/graphs.md @@ -112,7 +112,7 @@ DELETE http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/clear?confirm_ ##### Method & Url ``` -POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph_clone?clone_graph_name=hugegraph +POST http://localhost:8080/graphspaces/DEFAULT/graphs/cloneGraph?clone_graph_name=hugegraph ``` ##### Request Body [Optional] @@ -124,13 +124,13 @@ Clone a `non-auth` mode graph (set `Content-Type: application/json`) "gremlin.graph": "org.apache.hugegraph.HugeFactory", "backend": "rocksdb", "serializer": "binary", - "store": "hugegraph", + "store": "cloneGraph", "rocksdb.data_path": "./rks-data-xx", "rocksdb.wal_path": "./rks-data-xx" } ``` -> Note: +> Note: > 1. The data/wal_path can't be the same as the existing graph (use separate directories) > 2. Replace "gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy" to enable auth mode @@ -144,7 +144,9 @@ Clone a `non-auth` mode graph (set `Content-Type: application/json`) ```javascript { - "name": "hugegraph_clone", + "name" +: + "cloneGraph", "backend": "rocksdb" } ``` @@ -167,6 +169,8 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph2 ##### Request Body Create a non-auth graph (set `Content-Type: application/json`) +**Note**!! For version 1.7.0 and earlier, if the backend is hstore, you must add "task.scheduler_type": "distributed" in +the request body ```json { @@ -216,7 +220,7 @@ Since deleting a graph is a dangerous operation, we have added parameters for co ##### Method & Url ``` -DELETE http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph_clone?confirm_message=I%27m%20sure%20to%20drop%20the%20graph +DELETE http://localhost:8080/graphspaces/DEFAULT/graphs/graphA?confirm_message=I%27m%20sure%20to%20drop%20the%20graph ``` ##### Response Status From 88f810e5bd0990dea8e13690f7670d5d0da28fa3 Mon Sep 17 00:00:00 2001 From: Tsukilc <153273766+Tsukilc@users.noreply.github.com> Date: Mon, 19 Jan 2026 15:35:56 +0800 Subject: [PATCH 02/12] fix: fix graphs.md --- content/en/docs/clients/restful-api/graphs.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/en/docs/clients/restful-api/graphs.md b/content/en/docs/clients/restful-api/graphs.md index 3257efbd4..d115cf4bc 100644 --- a/content/en/docs/clients/restful-api/graphs.md +++ b/content/en/docs/clients/restful-api/graphs.md @@ -147,7 +147,9 @@ Clone a `non-auth` mode graph (set `Content-Type: application/json`) "name" : "cloneGraph", - "backend": "rocksdb" + "backend" +: + "rocksdb" } ``` From 9de89d2fea09c0326ca9b494908dfbd4def69199 Mon Sep 17 00:00:00 2001 From: Tsukilc <153273766+Tsukilc@users.noreply.github.com> Date: Mon, 19 Jan 2026 15:43:56 +0800 Subject: [PATCH 03/12] fix: fix graphs.md --- content/cn/docs/clients/restful-api/graphs.md | 7 ++----- content/en/docs/clients/restful-api/graphs.md | 10 +++------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/content/cn/docs/clients/restful-api/graphs.md b/content/cn/docs/clients/restful-api/graphs.md index f6179b3d5..0a3c45c80 100644 --- a/content/cn/docs/clients/restful-api/graphs.md +++ b/content/cn/docs/clients/restful-api/graphs.md @@ -144,9 +144,7 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/cloneGraph?clone_graph_nam ```javascript { - "name" -: - "cloneGraph", + "name": "cloneGraph", "backend": "rocksdb" } ``` @@ -219,8 +217,7 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph-xx ##### Method & Url ```javascript -DELETE -http://localhost:8080/graphspaces/DEFAULT/graphs/graphA?confirm_message=I%27m%20sure%20to%20drop%20the%20graph +DELETE http://localhost:8080/graphspaces/DEFAULT/graphs/graphA?confirm_message=I%27m%20sure%20to%20drop%20the%20graph ``` ##### Response Status diff --git a/content/en/docs/clients/restful-api/graphs.md b/content/en/docs/clients/restful-api/graphs.md index d115cf4bc..69376477e 100644 --- a/content/en/docs/clients/restful-api/graphs.md +++ b/content/en/docs/clients/restful-api/graphs.md @@ -142,14 +142,10 @@ Clone a `non-auth` mode graph (set `Content-Type: application/json`) ##### Response Body -```javascript +```json { - "name" -: - "cloneGraph", - "backend" -: - "rocksdb" + "name": "cloneGraph", + "backend": "rocksdb" } ``` From dceea2b1e48bdfb5e942c3b97ac6621e773d2858 Mon Sep 17 00:00:00 2001 From: Tsukilc <153273766+Tsukilc@users.noreply.github.com> Date: Mon, 19 Jan 2026 19:55:31 +0800 Subject: [PATCH 04/12] fix: fix graphs.md --- .../quickstart/hugegraph/hugegraph-server.md | 18 ++++++++++++++++++ .../quickstart/hugegraph/hugegraph-server.md | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/content/cn/docs/quickstart/hugegraph/hugegraph-server.md b/content/cn/docs/quickstart/hugegraph/hugegraph-server.md index a0606b94d..b19b07424 100644 --- a/content/cn/docs/quickstart/hugegraph/hugegraph-server.md +++ b/content/cn/docs/quickstart/hugegraph/hugegraph-server.md @@ -200,10 +200,26 @@ task.scheduler_type=distributed pd.peers=127.0.0.1:8686,127.0.0.1:8687,127.0.0.1:8688 ``` +```properties +# 简单示例(带鉴权) +gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy + +# 指定存储 hstore(必须) +backend=hstore +serializer=binary +store=hugegraph + +# pd config +pd.peers=127.0.0.1:8686 +``` + 2. 修改 HugeGraph-Server 的 `rest-server.properties` 配置: ```properties usePD=true + +# 若需要 auth +# auth.authenticator=org.apache.hugegraph.auth.StandardAuthenticator ``` 如果配置多个 HugeGraph-Server 节点,需要为每个节点修改 `rest-server.properties` 配置文件,例如: @@ -213,6 +229,7 @@ usePD=true usePD=true restserver.url=http://127.0.0.1:8081 gremlinserver.url=http://127.0.0.1:8181 +pd.peers=127.0.0.1:8686 rpc.server_host=127.0.0.1 rpc.server_port=8091 @@ -226,6 +243,7 @@ server.role=master usePD=true restserver.url=http://127.0.0.1:8082 gremlinserver.url=http://127.0.0.1:8182 +pd.peers=127.0.0.1:8686 rpc.server_host=127.0.0.1 rpc.server_port=8092 diff --git a/content/en/docs/quickstart/hugegraph/hugegraph-server.md b/content/en/docs/quickstart/hugegraph/hugegraph-server.md index 226238ae2..de4d13ccd 100644 --- a/content/en/docs/quickstart/hugegraph/hugegraph-server.md +++ b/content/en/docs/quickstart/hugegraph/hugegraph-server.md @@ -216,10 +216,26 @@ task.scheduler_type=distributed pd.peers=127.0.0.1:8686,127.0.0.1:8687,127.0.0.1:8688 ``` +```properties +# Full example (with authentication) +gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy + +# Specify storage hstore +backend=hstore +serializer=binary +store=hugegraph + +# pd config +pd.peers=127.0.0.1:8686 +``` + Then enable PD discovery in `rest-server.properties` (required for every HugeGraph-Server node): ```properties usePD=true + +# If auth is needed +# auth.authenticator=org.apache.hugegraph.auth.StandardAuthenticator ``` If configuring multiple HugeGraph-Server nodes, you need to modify the `rest-server.properties` configuration file for each node, for example: @@ -229,6 +245,7 @@ Node 1 (Master node): usePD=true restserver.url=http://127.0.0.1:8081 gremlinserver.url=http://127.0.0.1:8181 +pd.peers=127.0.0.1:8686 rpc.server_host=127.0.0.1 rpc.server_port=8091 @@ -242,6 +259,7 @@ Node 2 (Worker node): usePD=true restserver.url=http://127.0.0.1:8082 gremlinserver.url=http://127.0.0.1:8182 +pd.peers=127.0.0.1:8686 rpc.server_host=127.0.0.1 rpc.server_port=8092 From 08fb2ee047abbd3438c760fdc7696ec520fa1b9f Mon Sep 17 00:00:00 2001 From: Tsukilc <3168078770@qq.com> Date: Mon, 19 Jan 2026 20:16:44 +0800 Subject: [PATCH 05/12] Update content/en/docs/quickstart/hugegraph/hugegraph-server.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- content/en/docs/quickstart/hugegraph/hugegraph-server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/quickstart/hugegraph/hugegraph-server.md b/content/en/docs/quickstart/hugegraph/hugegraph-server.md index de4d13ccd..97538fa9d 100644 --- a/content/en/docs/quickstart/hugegraph/hugegraph-server.md +++ b/content/en/docs/quickstart/hugegraph/hugegraph-server.md @@ -217,7 +217,7 @@ pd.peers=127.0.0.1:8686,127.0.0.1:8687,127.0.0.1:8688 ``` ```properties -# Full example (with authentication) +# Simple example (with authentication) gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy # Specify storage hstore From 8770afc97bf243c90f5e59d63234a74ce1a28e8c Mon Sep 17 00:00:00 2001 From: Tsukilc <3168078770@qq.com> Date: Mon, 19 Jan 2026 20:16:55 +0800 Subject: [PATCH 06/12] Update content/en/docs/quickstart/hugegraph/hugegraph-server.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- content/en/docs/quickstart/hugegraph/hugegraph-server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/quickstart/hugegraph/hugegraph-server.md b/content/en/docs/quickstart/hugegraph/hugegraph-server.md index 97538fa9d..fc8a1e916 100644 --- a/content/en/docs/quickstart/hugegraph/hugegraph-server.md +++ b/content/en/docs/quickstart/hugegraph/hugegraph-server.md @@ -220,7 +220,7 @@ pd.peers=127.0.0.1:8686,127.0.0.1:8687,127.0.0.1:8688 # Simple example (with authentication) gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy -# Specify storage hstore +# Specify storage backend hstore backend=hstore serializer=binary store=hugegraph From b6998a8e0777e4653bb93bfd64d975bb093ca2bc Mon Sep 17 00:00:00 2001 From: Tsukilc <3168078770@qq.com> Date: Mon, 19 Jan 2026 20:17:08 +0800 Subject: [PATCH 07/12] Update content/en/docs/clients/restful-api/graphs.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- content/en/docs/clients/restful-api/graphs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/clients/restful-api/graphs.md b/content/en/docs/clients/restful-api/graphs.md index 69376477e..5cd97caa1 100644 --- a/content/en/docs/clients/restful-api/graphs.md +++ b/content/en/docs/clients/restful-api/graphs.md @@ -144,7 +144,7 @@ Clone a `non-auth` mode graph (set `Content-Type: application/json`) ```json { - "name": "cloneGraph", + "name": "cloneGraph", "backend": "rocksdb" } ``` From fe726d71f6b35db8eacf549cfac58d3d57ee8db6 Mon Sep 17 00:00:00 2001 From: Tsukilc <3168078770@qq.com> Date: Mon, 19 Jan 2026 20:17:26 +0800 Subject: [PATCH 08/12] Update content/en/docs/clients/restful-api/graphs.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- content/en/docs/clients/restful-api/graphs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/clients/restful-api/graphs.md b/content/en/docs/clients/restful-api/graphs.md index 5cd97caa1..bbc43a908 100644 --- a/content/en/docs/clients/restful-api/graphs.md +++ b/content/en/docs/clients/restful-api/graphs.md @@ -167,7 +167,7 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph2 ##### Request Body Create a non-auth graph (set `Content-Type: application/json`) -**Note**!! For version 1.7.0 and earlier, if the backend is hstore, you must add "task.scheduler_type": "distributed" in +**Note**! For version 1.7.0 and earlier, if the backend is hstore, you must add "task.scheduler_type": "distributed" in the request body ```json From c5d576d722d658168425a4046f95dd30e9930b4e Mon Sep 17 00:00:00 2001 From: Tsukilc <153273766+Tsukilc@users.noreply.github.com> Date: Mon, 19 Jan 2026 20:45:08 +0800 Subject: [PATCH 09/12] fix: fix graphs.md --- content/cn/docs/clients/restful-api/graphs.md | 24 +++++++++++++++-- .../quickstart/hugegraph/hugegraph-server.md | 3 +++ content/en/docs/clients/restful-api/graphs.md | 27 ++++++++++++++++--- .../quickstart/hugegraph/hugegraph-server.md | 1 + 4 files changed, 49 insertions(+), 6 deletions(-) diff --git a/content/cn/docs/clients/restful-api/graphs.md b/content/cn/docs/clients/restful-api/graphs.md index 0a3c45c80..9abec593a 100644 --- a/content/cn/docs/clients/restful-api/graphs.md +++ b/content/cn/docs/clients/restful-api/graphs.md @@ -166,8 +166,15 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph-xx ##### Request Body -创建一个非鉴权模式的图(设置 `Content-Type: application/json`) -**注意**!!1.7.0 及之前,如果 backend 是 hstore,必须在请求体加上 "task.scheduler_type": "distributed" +创建一个图(设置 `Content-Type: application/json`) + +**`gremlin.graph` 配置说明:** +- 非鉴权模式:`"gremlin.graph": "org.apache.hugegraph.HugeFactory"` +- 鉴权模式:`"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy"` + +**注意**!!1.7.0 及之前,如果 backend 是 hstore,必须在请求体加上 "task.scheduler_type": "distributed"。同时请确保 HugeGraph-Server 已正确配置 PD,参见 [HStore 配置](/cn/docs/quickstart/hugegraph/hugegraph-server/#511-分布式存储hstore)。 + +**RocksDB 示例(非鉴权模式):** ```json { @@ -180,6 +187,19 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph-xx } ``` +**HStore 示例:** + +```json +{ + "gremlin.graph": "org.apache.hugegraph.HugeFactory", + "backend": "hstore", + "serializer": "binary", + "store": "hugegraph2", + "task.scheduler_type": "distributed", + "pd.peers": "127.0.0.1:8686" +} +``` + > Note: > 1. Rocksdb 存储路径不能与现有图相同(需使用不同的目录) > 2. 如需开启新图的权限系统,需替换设置 `gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy` diff --git a/content/cn/docs/quickstart/hugegraph/hugegraph-server.md b/content/cn/docs/quickstart/hugegraph/hugegraph-server.md index b19b07424..db0dd961b 100644 --- a/content/cn/docs/quickstart/hugegraph/hugegraph-server.md +++ b/content/cn/docs/quickstart/hugegraph/hugegraph-server.md @@ -209,6 +209,9 @@ backend=hstore serializer=binary store=hugegraph +# 指定任务调度器(1.7.0及之前必须) +task.scheduler_type=distributed + # pd config pd.peers=127.0.0.1:8686 ``` diff --git a/content/en/docs/clients/restful-api/graphs.md b/content/en/docs/clients/restful-api/graphs.md index bbc43a908..6b8a157ff 100644 --- a/content/en/docs/clients/restful-api/graphs.md +++ b/content/en/docs/clients/restful-api/graphs.md @@ -166,9 +166,15 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph2 ##### Request Body -Create a non-auth graph (set `Content-Type: application/json`) -**Note**! For version 1.7.0 and earlier, if the backend is hstore, you must add "task.scheduler_type": "distributed" in -the request body +Create a graph (set `Content-Type: application/json`) + +**`gremlin.graph` Configuration:** +- Non-auth mode: `"gremlin.graph": "org.apache.hugegraph.HugeFactory"` +- Auth mode: `"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy"` + +**Note**!! For version 1.7.0 and earlier, if the backend is hstore, you must add "task.scheduler_type": "distributed" in the request body. Also ensure HugeGraph-Server is properly configured with PD, see [HStore Configuration](/docs/quickstart/hugegraph/hugegraph-server/#511-distributed-storage-hstore). + +**RocksDB Example (non-auth mode):** ```json { @@ -181,7 +187,20 @@ the request body } ``` -> Note: +**HStore Example (for version 1.7.0 and earlier):** + +```json +{ + "gremlin.graph": "org.apache.hugegraph.HugeFactory", + "backend": "hstore", + "serializer": "binary", + "store": "hugegraph2", + "task.scheduler_type": "distributed", + "pd.peers": "127.0.0.1:8686" +} +``` + +> Note: > 1. The data/wal_path can't be the same as the existing graph (use separate directories) > 2. Replace "gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy" to enable auth mode diff --git a/content/en/docs/quickstart/hugegraph/hugegraph-server.md b/content/en/docs/quickstart/hugegraph/hugegraph-server.md index fc8a1e916..a06f317e8 100644 --- a/content/en/docs/quickstart/hugegraph/hugegraph-server.md +++ b/content/en/docs/quickstart/hugegraph/hugegraph-server.md @@ -224,6 +224,7 @@ gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy backend=hstore serializer=binary store=hugegraph +task.scheduler_type=distributed # pd config pd.peers=127.0.0.1:8686 From 343c3c35f582ee51f90695655c0051edbb02264d Mon Sep 17 00:00:00 2001 From: Tsukilc <153273766+Tsukilc@users.noreply.github.com> Date: Wed, 21 Jan 2026 14:33:40 +0800 Subject: [PATCH 10/12] fix: fix graphs.md --- content/cn/docs/clients/restful-api/graphs.md | 18 +++++++++--------- content/en/docs/clients/restful-api/graphs.md | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/content/cn/docs/clients/restful-api/graphs.md b/content/cn/docs/clients/restful-api/graphs.md index 9abec593a..fbbd51fda 100644 --- a/content/cn/docs/clients/restful-api/graphs.md +++ b/content/cn/docs/clients/restful-api/graphs.md @@ -169,16 +169,18 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph-xx 创建一个图(设置 `Content-Type: application/json`) **`gremlin.graph` 配置说明:** +- 鉴权模式:`"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy"`(推荐) - 非鉴权模式:`"gremlin.graph": "org.apache.hugegraph.HugeFactory"` -- 鉴权模式:`"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy"` -**注意**!!1.7.0 及之前,如果 backend 是 hstore,必须在请求体加上 "task.scheduler_type": "distributed"。同时请确保 HugeGraph-Server 已正确配置 PD,参见 [HStore 配置](/cn/docs/quickstart/hugegraph/hugegraph-server/#511-分布式存储hstore)。 +**注意**!! +1. 在 1.7.0 版本中,动态创建图会导致 NPE 错误。该问题已在 [PR#2912](https://github.com/apache/incubator-hugegraph/pull/2912) 中修复。当前 master 版本和 1.7.0 之前的版本不受此问题影响。 +2. 1.7.0 及之前版本,如果 backend 是 hstore,必须在请求体加上 "task.scheduler_type": "distributed"。同时请确保 HugeGraph-Server 已正确配置 PD,参见 [HStore 配置](/cn/docs/quickstart/hugegraph/hugegraph-server/#511-分布式存储hstore)。 -**RocksDB 示例(非鉴权模式):** +**RocksDB 示例:** ```json { - "gremlin.graph": "org.apache.hugegraph.HugeFactory", + "gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy", "backend": "rocksdb", "serializer": "binary", "store": "hugegraph", @@ -187,11 +189,11 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph-xx } ``` -**HStore 示例:** +**HStore 示例(适用于 1.7.0 及之前版本):** ```json { - "gremlin.graph": "org.apache.hugegraph.HugeFactory", + "gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy", "backend": "hstore", "serializer": "binary", "store": "hugegraph2", @@ -200,9 +202,7 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph-xx } ``` -> Note: -> 1. Rocksdb 存储路径不能与现有图相同(需使用不同的目录) -> 2. 如需开启新图的权限系统,需替换设置 `gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy` +> Note: Rocksdb 存储路径不能与现有图相同(需使用不同的目录) ##### Response Status diff --git a/content/en/docs/clients/restful-api/graphs.md b/content/en/docs/clients/restful-api/graphs.md index 6b8a157ff..d82596105 100644 --- a/content/en/docs/clients/restful-api/graphs.md +++ b/content/en/docs/clients/restful-api/graphs.md @@ -169,16 +169,18 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph2 Create a graph (set `Content-Type: application/json`) **`gremlin.graph` Configuration:** +- Auth mode: `"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy"` (Recommended) - Non-auth mode: `"gremlin.graph": "org.apache.hugegraph.HugeFactory"` -- Auth mode: `"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy"` -**Note**!! For version 1.7.0 and earlier, if the backend is hstore, you must add "task.scheduler_type": "distributed" in the request body. Also ensure HugeGraph-Server is properly configured with PD, see [HStore Configuration](/docs/quickstart/hugegraph/hugegraph-server/#511-distributed-storage-hstore). +**Note**!! +1. In version 1.7.0, dynamic graph creation would cause a NPE. This issue has been fixed in [PR#2912](https://github.com/apache/incubator-hugegraph/pull/2912). The current master version and version 1.7.0- do not have this problem. +2. For version 1.7.0 and earlier, if the backend is hstore, you must add "task.scheduler_type": "distributed" in the request body. Also ensure HugeGraph-Server is properly configured with PD, see [HStore Configuration](/docs/quickstart/hugegraph/hugegraph-server/#511-distributed-storage-hstore). -**RocksDB Example (non-auth mode):** +**RocksDB Example:** ```json { - "gremlin.graph": "org.apache.hugegraph.HugeFactory", + "gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy", "backend": "rocksdb", "serializer": "binary", "store": "hugegraph2", @@ -191,7 +193,7 @@ Create a graph (set `Content-Type: application/json`) ```json { - "gremlin.graph": "org.apache.hugegraph.HugeFactory", + "gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy", "backend": "hstore", "serializer": "binary", "store": "hugegraph2", @@ -200,9 +202,7 @@ Create a graph (set `Content-Type: application/json`) } ``` -> Note: -> 1. The data/wal_path can't be the same as the existing graph (use separate directories) -> 2. Replace "gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy" to enable auth mode +> Note: The data/wal_path can't be the same as the existing graph (use separate directories) ##### Response Status From e3ee5816842794d76d9afb3e1dfba5c07c508b89 Mon Sep 17 00:00:00 2001 From: Tsukilc <3168078770@qq.com> Date: Wed, 21 Jan 2026 14:46:47 +0800 Subject: [PATCH 11/12] Update content/en/docs/clients/restful-api/graphs.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- content/en/docs/clients/restful-api/graphs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/clients/restful-api/graphs.md b/content/en/docs/clients/restful-api/graphs.md index d82596105..126935ee5 100644 --- a/content/en/docs/clients/restful-api/graphs.md +++ b/content/en/docs/clients/restful-api/graphs.md @@ -173,7 +173,7 @@ Create a graph (set `Content-Type: application/json`) - Non-auth mode: `"gremlin.graph": "org.apache.hugegraph.HugeFactory"` **Note**!! -1. In version 1.7.0, dynamic graph creation would cause a NPE. This issue has been fixed in [PR#2912](https://github.com/apache/incubator-hugegraph/pull/2912). The current master version and version 1.7.0- do not have this problem. +1. In version 1.7.0, dynamic graph creation would cause a NPE. This issue has been fixed in [PR#2912](https://github.com/apache/incubator-hugegraph/pull/2912). The current master version and versions after 1.7.0 do not have this problem. 2. For version 1.7.0 and earlier, if the backend is hstore, you must add "task.scheduler_type": "distributed" in the request body. Also ensure HugeGraph-Server is properly configured with PD, see [HStore Configuration](/docs/quickstart/hugegraph/hugegraph-server/#511-distributed-storage-hstore). **RocksDB Example:** From 7ee85c9df09ec4fd73ce579c2f0708ba97cfb2a8 Mon Sep 17 00:00:00 2001 From: Tsukilc <153273766+Tsukilc@users.noreply.github.com> Date: Wed, 21 Jan 2026 16:18:12 +0800 Subject: [PATCH 12/12] fix: fix graphs.md --- content/cn/docs/clients/restful-api/graphs.md | 6 +++--- content/cn/docs/quickstart/hugegraph/hugegraph-server.md | 2 +- content/en/docs/clients/restful-api/graphs.md | 8 ++++---- content/en/docs/quickstart/hugegraph/hugegraph-server.md | 2 ++ 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/content/cn/docs/clients/restful-api/graphs.md b/content/cn/docs/clients/restful-api/graphs.md index fbbd51fda..2dfec1c4b 100644 --- a/content/cn/docs/clients/restful-api/graphs.md +++ b/content/cn/docs/clients/restful-api/graphs.md @@ -119,7 +119,7 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/cloneGraph?clone_graph_nam 克隆一个非鉴权模式的图(设置 `Content-Type: application/json`) -```json +```javascript { "gremlin.graph": "org.apache.hugegraph.HugeFactory", "backend": "rocksdb", @@ -178,7 +178,7 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph-xx **RocksDB 示例:** -```json +```javascript { "gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy", "backend": "rocksdb", @@ -191,7 +191,7 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph-xx **HStore 示例(适用于 1.7.0 及之前版本):** -```json +```javascript { "gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy", "backend": "hstore", diff --git a/content/cn/docs/quickstart/hugegraph/hugegraph-server.md b/content/cn/docs/quickstart/hugegraph/hugegraph-server.md index db0dd961b..d1deef244 100644 --- a/content/cn/docs/quickstart/hugegraph/hugegraph-server.md +++ b/content/cn/docs/quickstart/hugegraph/hugegraph-server.md @@ -209,7 +209,7 @@ backend=hstore serializer=binary store=hugegraph -# 指定任务调度器(1.7.0及之前必须) +# 指定任务调度器(1.7.0及之前,hstore 存储必须) task.scheduler_type=distributed # pd config diff --git a/content/en/docs/clients/restful-api/graphs.md b/content/en/docs/clients/restful-api/graphs.md index 126935ee5..899f1a67c 100644 --- a/content/en/docs/clients/restful-api/graphs.md +++ b/content/en/docs/clients/restful-api/graphs.md @@ -119,7 +119,7 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/cloneGraph?clone_graph_nam Clone a `non-auth` mode graph (set `Content-Type: application/json`) -```json +```javascript { "gremlin.graph": "org.apache.hugegraph.HugeFactory", "backend": "rocksdb", @@ -142,7 +142,7 @@ Clone a `non-auth` mode graph (set `Content-Type: application/json`) ##### Response Body -```json +```javascript { "name": "cloneGraph", "backend": "rocksdb" @@ -178,7 +178,7 @@ Create a graph (set `Content-Type: application/json`) **RocksDB Example:** -```json +```javascript { "gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy", "backend": "rocksdb", @@ -191,7 +191,7 @@ Create a graph (set `Content-Type: application/json`) **HStore Example (for version 1.7.0 and earlier):** -```json +```javascript { "gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy", "backend": "hstore", diff --git a/content/en/docs/quickstart/hugegraph/hugegraph-server.md b/content/en/docs/quickstart/hugegraph/hugegraph-server.md index a06f317e8..2db777070 100644 --- a/content/en/docs/quickstart/hugegraph/hugegraph-server.md +++ b/content/en/docs/quickstart/hugegraph/hugegraph-server.md @@ -224,6 +224,8 @@ gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy backend=hstore serializer=binary store=hugegraph + +# Specify the task scheduler (for versions 1.7.0 and earlier, hstore storage is required) task.scheduler_type=distributed # pd config