aroundabout commented on code in PR #288:
URL:
https://github.com/apache/incubator-hugegraph-doc/pull/288#discussion_r1350055236
##########
content/cn/docs/quickstart/hugegraph-server.md:
##########
@@ -462,125 +582,5 @@ $bin/stop-hugegraph.sh
### 8 使用 IntelliJ IDEA 调试 Server
请参考[在 IDEA 中配置 Server
开发环境](/docs/contribution-guidelines/hugegraph-server-idea-setup)
-
-### 9 在启动 Server 时创建示例图
-
-有三种方式可以在启动 Server 时创建示例图
-- 方式一:直接修改配置文件
-- 方式二:启动脚本使用命令行参数
-- 方式三:使用 docker 或 docker-compose 添加环境变量
-
-#### 9.1 直接修改配置文件
-
-修改 `conf/gremlin-server.yaml`,将 `empty-sample.groovy` 修改为 `example.groovy`:
-
-```yaml
-org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {
- files: [scripts/example.groovy]
-}
-```
-
-修改 `scripts/example.groovy`,将:
-
-```groovy
-RegisterUtil.registerRocksDB()
-conf = "conf/graphs/hugegraph.properties"
-graph = HugeFactory.open(conf)
-graph.serverStarted(IdGenerator.of("server-tinkerpop"), NodeRole.MASTER)
-schema = graph.schema()
-```
-
-修改为:
-
-```groovy
-conf = "conf/graphs/hugegraph.properties"
-graph = HugeFactory.open(conf)
-schema = graph.schema()
-```
-
-然后使用脚本启动 HugeGraph-Server,如果打印出类似日志:
-
-```java
-2023-06-10 19:41:14 [main] [INFO] o.a.h.d.HugeGremlinServer
[org.apache.hugegraph.dist.HugeGremlinServer.start(HugeGremlinServer.java:38)]
- 3.5.1
- \,,,/
- (o o)
------oOOo-(3)-oOOo-----
-
-2023-06-10 19:41:14 [main] [INFO] o.a.h.u.ConfigUtil
[org.apache.hugegraph.util.ConfigUtil.scanGraphsDir(ConfigUtil.java:88)] -
Scanning option 'graphs' directory './conf/graphs'
-2023-06-10 19:41:14 [main] [INFO] o.a.h.d.HugeGremlinServer
[org.apache.hugegraph.dist.HugeGremlinServer.start(HugeGremlinServer.java:52)]
- Configuring Gremlin Server from
/Users/dingyuchen/Desktop/hugegraph/apache-hugegraph-incubating-1.0.0/conf/gremlin-server.yaml
->>>> query all vertices: size=6
->>>> query all edges: size=6
-```
-
-并且使用 RESTful API 请求 `HugeGraphServer` 得到如下结果:
-
-```javascript
-> curl "http://localhost:8080/graphs/hugegraph/graph/vertices" | gunzip
-
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
-100 222 100 222 0 0 3163 0 --:--:-- --:--:-- --:--:-- 3964
-{"vertices":[{"id":"2:lop","label":"software","type":"vertex","properties":{"name":"lop","lang":"java","price":328}},{"id":"1:josh","label":"person","type":"vertex","properties":{"name":"josh","age":32,"city":"Beijing"}},{"id":"1:marko","label":"person","type":"vertex","properties":{"name":"marko","age":29,"city":"Beijing"}},{"id":"1:peter","label":"person","type":"vertex","properties":{"name":"peter","age":35,"city":"Shanghai"}},{"id":"1:vadas","label":"person","type":"vertex","properties":{"name":"vadas","age":27,"city":"Hongkong"}},{"id":"2:ripple","label":"software","type":"vertex","properties":{"name":"ripple","lang":"java","price":199}}]}
-```
-
-代表创建示例图成功。
-
-> 使用 IntelliJ IDEA 在启动 Server 时创建示例图的流程类似,不再赘述。
-
-
-#### 9.2 启动脚本时指定参数
-
-在脚本启动时候携带 `-p true`参数,表示 preload, 即创建示例图图
-
-```
-bin/start-hugegraph.sh -p true
-Starting HugeGraphServer in daemon mode...
-Connecting to HugeGraphServer (http://127.0.0.1:8080/graphs)......OK
-```
-
-并且使用 RESTful API 请求 `HugeGraphServer` 得到如下结果:
-
-```javascript
-> curl "http://localhost:8080/graphs/hugegraph/graph/vertices" | gunzip
-
-{"vertices":[{"id":"2:lop","label":"software","type":"vertex","properties":{"name":"lop","lang":"java","price":328}},{"id":"1:josh","label":"person","type":"vertex","properties":{"name":"josh","age":32,"city":"Beijing"}},{"id":"1:marko","label":"person","type":"vertex","properties":{"name":"marko","age":29,"city":"Beijing"}},{"id":"1:peter","label":"person","type":"vertex","properties":{"name":"peter","age":35,"city":"Shanghai"}},{"id":"1:vadas","label":"person","type":"vertex","properties":{"name":"vadas","age":27,"city":"Hongkong"}},{"id":"2:ripple","label":"software","type":"vertex","properties":{"name":"ripple","lang":"java","price":199}}]}
-```
-
-代表创建示例图成功。
-
-
-#### 9.3 使用 docker 启动
-
-在 docker 启动的时候设置环境变量 `PRELOAD=true`, 从而实现启动脚本的时候加载数据。
-
-1. 使用`docker run`
-
- 使用 `docker run -itd --name=graph -p 18080:8080 -e PRELOAD=true
hugegraph/hugegraph:latest`
-
-2. 使用`docker-compose`
-
- 创建`docker-compose.yml`,具体文件如下
-
- ```yaml
- version: '3'
- services:
- graph:
- image: hugegraph/hugegraph:latest
- container_name: graph
- environment:
- - PRELOAD=true
- ports:
- - 18080:8080
- ```
-
- 使用命令 `docker-compose up -d` 启动容器
-
-使用 RESTful API 请求 `HugeGraphServer` 得到如下结果:
-
-```javascript
-> curl "http://localhost:18080/graphs/hugegraph/graph/vertices" | gunzip
-
-{"vertices":[{"id":"2:lop","label":"software","type":"vertex","properties":{"name":"lop","lang":"java","price":328}},{"id":"1:josh","label":"person","type":"vertex","properties":{"name":"josh","age":32,"city":"Beijing"}},{"id":"1:marko","label":"person","type":"vertex","properties":{"name":"marko","age":29,"city":"Beijing"}},{"id":"1:peter","label":"person","type":"vertex","properties":{"name":"peter","age":35,"city":"Shanghai"}},{"id":"1:vadas","label":"person","type":"vertex","properties":{"name":"vadas","age":27,"city":"Hongkong"}},{"id":"2:ripple","label":"software","type":"vertex","properties":{"name":"ripple","lang":"java","price":199}}]}
-```
-
-代表创建示例图成功。
+
+\
Review Comment:
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]