Skip to content
This repository was archived by the owner on Dec 28, 2025. It is now read-only.

Commit 8dc9b34

Browse files
fixed problems
1 parent d820e80 commit 8dc9b34

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

content/cn/docs/guides/toolchain-local-test.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ cd hugegraph-toolchain
6262
#### 3.1.1 变量与参数
6363

6464
* **`$COMMIT_ID`**
65-
* 指定 HugeGraph Server 源代码的 Git Commit ID。当您需要从源代码编译和安装特定版本的 HugeGraph Server 作为测试依赖时,会使用此变量,确保测试环境与特定 HugeGraph Server 版本的一致性,这对于复现问题或验证兼容性至关重要。使用时直接接作为参数传递给 install-hugegraph-from-source.sh 脚本。
65+
* 指定 HugeGraph Server 源代码的 Git Commit ID。当您需要从源代码编译和安装特定版本的 HugeGraph Server 作为测试依赖时,会使用此变量,确保测试环境与特定 HugeGraph Server 版本的一致性,这对于复现问题或验证兼容性至关重要。使用时直接作为参数传递给 install-hugegraph-from-source.sh 脚本。
6666

6767
* **`$DB_DATABASE``$DB_PASS`**
6868
指定 HugeGraph-Loader 进行 JDBC 测试时所连接的 MySQL 数据库名称与 root 用户密码。请作为参数传递给 `install-mysql.sh` 脚本,供 Loader 正常读写数据。
@@ -124,6 +124,8 @@ docker run -itd --name=server -p 8080:8080 --network hugegraph-net hugegraph/hug
124124
以下是一个示例 `docker-compose.yml` 文件,它定义了 HugeGraph Server、MySQL 和 Hadoop (HDFS) 服务。您可以根据实际测试需求进行调整。请使用 Docker Compose V2 。
125125

126126
```yaml
127+
version: '3.8'
128+
127129
services:
128130
hugegraph-server:
129131
image: hugegraph/hugegraph:latest # 可以替换为特定版本,或构建自己的镜像
@@ -234,11 +236,11 @@ volumes:
234236
<configuration>
235237
<property>
236238
<name>dfs.namenode.name.dir</name>
237-
<value>/opt/hdfs/name</value>
239+
<value>/hadoop/hdfs/name</value>
238240
</property>
239241
<property>
240242
<name>dfs.datanode.data.dir</name>
241-
<value>/opt/hdfs/data</value>
243+
<value>/hadoop/hdfs/data</value>
242244
</property>
243245
<property>
244246
<name>dfs.permissions.superusergroup</name>
@@ -423,7 +425,7 @@ mvn -e compile -Dmaven.javadoc.skip=true -ntp
423425

424426
**1. 启动 HugeGraph Server**
425427

426-
按照 [部署测试环境](https://www.google.com/search?q=%233-%E9%83%A8%E7%BD%B2%E6%B5%8B%E8%AF%95%E7%8E%AF%E5%A2%83) 启动 HugeGraph Server。
428+
按照 [部署测试环境](#3-部署测试环境) 启动 HugeGraph Server。
427429

428430
**2. 安装 Python 依赖**
429431

@@ -555,7 +557,7 @@ mvn test -Dtest=FuncTestSuite -pl hugegraph-tools -ntp
555557
* **问题描述**:命令执行失败,提示找不到文件、权限不足或参数无效。
556558
* **排查方法**
557559
* 仔细检查您设置的环境变量(如 `$COMMIT_ID``$DB_DATABASE``$DB_PASS`)是否正确,并且在执行命令的 shell 会话中已生效。
558-
* 确认 Maven 命令参数和 Shell 脚本参数的拼写和用法是否正确,参考 [3.1.1 变量与参数](#3-1-1-变量与参数) 章节。
560+
* 确认 Maven 命令参数和 Shell 脚本参数的拼写和用法是否正确,参考 [3.1.1 变量与参数](#311-变量与参数) 章节。
559561
* 如遇脚本权限问题,先执行:`chmod +x hugegraph-*/assembly/travis/*.sh`
560562

561563
* **HDFS 测试问题**
@@ -578,4 +580,4 @@ mvn test -Dtest=FuncTestSuite -pl hugegraph-tools -ntp
578580
* **HugeGraph 工具链 GitHub 仓库**:[https://github.com/apache/hugegraph-toolchain](https://github.com/apache/hugegraph-toolchain)
579581
* **HugeGraph Server 官方文档**:[https://hugegraph.apache.org/docs/](https://hugegraph.apache.org/docs/)
580582
* **CI 脚本路径**`.github/workflows/*-ci.yml`(HugeGraph 工具链项目中的 CI 配置文件,可作为参考)
581-
* **依赖服务安装脚本**`hugegraph-*/assembly/travis/`(HugeGraph 工具链项目中用于 Travis CI 的安装脚本,可作为手动安装的参考)
583+
* **依赖服务安装脚本**`hugegraph-*/assembly/travis/`(HugeGraph 工具链项目中用于 Travis CI 的安装脚本,可作为手动安装的参考)

content/en/docs/guides/toolchain-local-test.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ services:
178178
# - ./config/core-site.xml:/hadoop/etc/hadoop/core-site.xml
179179
# - ./config/hdfs-site.xml:/hadoop/etc/hadoop/hdfs-site.xml
180180
# - namenode_data:/hadoop/dfs/name
181-
# command: bash -c "hdfs namenode -format && /entrypoint.sh"
181+
# command: bash -c "if [ ! -d /hadoop/dfs/name/current ]; then hdfs namenode -format; fi && /entrypoint.sh"
182182
# healthcheck:
183183
# test: ["CMD", "hdfs", "dfsadmin", "-report"]
184184
# interval: 5s
@@ -234,11 +234,11 @@ volumes:
234234
<configuration>
235235
<property>
236236
<name>dfs.namenode.name.dir</name>
237-
<value>/opt/hdfs/name</value>
237+
<value>/hadoop/hdfs/name</value>
238238
</property>
239239
<property>
240240
<name>dfs.datanode.data.dir</name>
241-
<value>/opt/hdfs/data</value>
241+
<value>/hadoop/hdfs/data</value>
242242
</property>
243243
<property>
244244
<name>dfs.permissions.superusergroup</name>
@@ -553,7 +553,7 @@ This section lists some common problems that may be encountered during local tes
553553
* **Problem Description**: Command execution fails with a message about a file not found, insufficient permissions, or invalid parameters.
554554
* **Troubleshooting**:
555555
* Carefully check if the environment variables you set (e.g., `$COMMIT_ID`, `$DB_DATABASE`, `$DB_PASS`) are correct and have taken effect in the shell session where the command is executed.
556-
* Confirm that the spelling and usage of Maven command parameters and Shell script parameters are correct, referring to the [3.1.1 Variables and Parameters](#3-1-1-variables-and-parameters) section.
556+
* Confirm that the spelling and usage of Maven command parameters and Shell script parameters are correct, referring to the [3.1.1 Variables and Parameters](#311-variables-and-parameters) section.
557557
* If you encounter script permission issues, first execute: `chmod +x hugegraph-*/assembly/travis/*.sh`.
558558

559559
* **HDFS Test Issues**:
@@ -576,4 +576,4 @@ This section lists some common problems that may be encountered during local tes
576576
* **HugeGraph Toolchain GitHub Repository**: [https://github.com/apache/hugegraph-toolchain](https://github.com/apache/hugegraph-toolchain)
577577
* **HugeGraph Server Official Documentation**: [https://hugegraph.apache.org/docs/](https://hugegraph.apache.org/docs/)
578578
* **CI Script Path**: `.github/workflows/*-ci.yml` (CI configuration files in the HugeGraph toolchain project, which can be used as a reference)
579-
* **Dependent Service Installation Scripts**: `hugegraph-*/assembly/travis/` (Installation scripts used for Travis CI in the HugeGraph toolchain project, which can be used as a reference for manual installation)
579+
* **Dependent Service Installation Scripts**: `hugegraph-*/assembly/travis/` (Installation scripts used for Travis CI in the HugeGraph toolchain project, which can be used as a reference for manual installation)

0 commit comments

Comments
 (0)