Skip to content

Commit 343c3c3

Browse files
committed
fix: fix graphs.md
1 parent c5d576d commit 343c3c3

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

content/cn/docs/clients/restful-api/graphs.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,18 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph-xx
169169
创建一个图(设置 `Content-Type: application/json`
170170

171171
**`gremlin.graph` 配置说明:**
172+
- 鉴权模式:`"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy"`(推荐)
172173
- 非鉴权模式:`"gremlin.graph": "org.apache.hugegraph.HugeFactory"`
173-
- 鉴权模式:`"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy"`
174174

175-
**注意**!!1.7.0 及之前,如果 backend 是 hstore,必须在请求体加上 "task.scheduler_type": "distributed"。同时请确保 HugeGraph-Server 已正确配置 PD,参见 [HStore 配置](/cn/docs/quickstart/hugegraph/hugegraph-server/#511-分布式存储hstore)
175+
**注意**!!
176+
1. 在 1.7.0 版本中,动态创建图会导致 NPE 错误。该问题已在 [PR#2912](https://github.com/apache/incubator-hugegraph/pull/2912) 中修复。当前 master 版本和 1.7.0 之前的版本不受此问题影响。
177+
2. 1.7.0 及之前版本,如果 backend 是 hstore,必须在请求体加上 "task.scheduler_type": "distributed"。同时请确保 HugeGraph-Server 已正确配置 PD,参见 [HStore 配置](/cn/docs/quickstart/hugegraph/hugegraph-server/#511-分布式存储hstore)
176178

177-
**RocksDB 示例(非鉴权模式)**
179+
**RocksDB 示例:**
178180

179181
```json
180182
{
181-
"gremlin.graph": "org.apache.hugegraph.HugeFactory",
183+
"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy",
182184
"backend": "rocksdb",
183185
"serializer": "binary",
184186
"store": "hugegraph",
@@ -187,11 +189,11 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph-xx
187189
}
188190
```
189191

190-
**HStore 示例:**
192+
**HStore 示例(适用于 1.7.0 及之前版本)**
191193

192194
```json
193195
{
194-
"gremlin.graph": "org.apache.hugegraph.HugeFactory",
196+
"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy",
195197
"backend": "hstore",
196198
"serializer": "binary",
197199
"store": "hugegraph2",
@@ -200,9 +202,7 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph-xx
200202
}
201203
```
202204

203-
> Note:
204-
> 1. Rocksdb 存储路径不能与现有图相同(需使用不同的目录)
205-
> 2. 如需开启新图的权限系统,需替换设置 `gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy`
205+
> Note: Rocksdb 存储路径不能与现有图相同(需使用不同的目录)
206206
207207
##### Response Status
208208

content/en/docs/clients/restful-api/graphs.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,18 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph2
169169
Create a graph (set `Content-Type: application/json`)
170170

171171
**`gremlin.graph` Configuration:**
172+
- Auth mode: `"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy"` (Recommended)
172173
- Non-auth mode: `"gremlin.graph": "org.apache.hugegraph.HugeFactory"`
173-
- Auth mode: `"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy"`
174174

175-
**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).
175+
**Note**!!
176+
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.
177+
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).
176178

177-
**RocksDB Example (non-auth mode):**
179+
**RocksDB Example:**
178180

179181
```json
180182
{
181-
"gremlin.graph": "org.apache.hugegraph.HugeFactory",
183+
"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy",
182184
"backend": "rocksdb",
183185
"serializer": "binary",
184186
"store": "hugegraph2",
@@ -191,7 +193,7 @@ Create a graph (set `Content-Type: application/json`)
191193

192194
```json
193195
{
194-
"gremlin.graph": "org.apache.hugegraph.HugeFactory",
196+
"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy",
195197
"backend": "hstore",
196198
"serializer": "binary",
197199
"store": "hugegraph2",
@@ -200,9 +202,7 @@ Create a graph (set `Content-Type: application/json`)
200202
}
201203
```
202204

203-
> Note:
204-
> 1. The data/wal_path can't be the same as the existing graph (use separate directories)
205-
> 2. Replace "gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy" to enable auth mode
205+
> Note: The data/wal_path can't be the same as the existing graph (use separate directories)
206206
207207
##### Response Status
208208

0 commit comments

Comments
 (0)