From 0f2502a3f252643cdc4c079befec117e3ad5e608 Mon Sep 17 00:00:00 2001 From: shawdan <61895496+oldLady344@users.noreply.github.com> Date: Fri, 8 Jan 2021 11:00:27 +0800 Subject: [PATCH] updated compiling procedure --- docs/nebula-algorithm/na-ug-compile.md | 39 ++++---- .../about-exchange/ex-ug-limitations.md | 4 +- .../about-exchange/ex-ug-what-is-exchange.md | 1 + docs/nebula-exchange/ex-ug-compile.md | 89 ++++++++++--------- .../ex-ug-paras-nebulagraph.md | 6 +- .../use-exchange/ex-ug-import-sst.md | 2 + docs/nebula-flink/nf-ug-compile.md | 60 ++++++++----- docs/spark-connector/sc-ug-compile.md | 60 +++++++------ 8 files changed, 148 insertions(+), 113 deletions(-) diff --git a/docs/nebula-algorithm/na-ug-compile.md b/docs/nebula-algorithm/na-ug-compile.md index 3435b67ad4..cd94537095 100644 --- a/docs/nebula-algorithm/na-ug-compile.md +++ b/docs/nebula-algorithm/na-ug-compile.md @@ -6,35 +6,36 @@ ## 操作步骤 -依次运行以下命令下载并编译打包 nebula-algorithm。 +切换到 `nebula-java/tools/nebula-algorithm` 目录,并编译打包 nebula-algorithm。 -```shell -$ git clone -b v1.0 https://github.com/vesoft-inc/nebula-java.git +```bash $ cd nebula-java/tools/nebula-algorithm -$ mvn package -DskipTests +$ mvn clean package -Dgpg.skip -Dmaven.javadoc.skip=true -Dmaven.test.skip=true ``` 编译成功后,您可以在当前目录里看到如下目录结构。 ```text -nebula-java - ├── pom.xml - ├── src - │   ├── main - │   └── test - └── target - ├── classes - ├── classes.1846592514.timestamp - ├── maven-archiver - ├── maven-status - ├── nebula-algorithm-1.x.y-tests.jar - ├── nebula-algorithm-1.x.y.jar - ├── original-nebula-algorithm-1.x.y.jar - ├── test-classes - └── test-classes.1846592514.timestamp +. +├── README.md +├── pom.xml +├── src +│ ├── main +│ └── test +└── target + ├── classes + ├── classes.682519136.timestamp + ├── maven-archiver + ├── maven-status + ├── nebula-algorithm-1.x.y-tests.jar + ├── nebula-algorithm-1.x.y.jar + ├── original-nebula-algorithm-1.x.y.jar + ├── test-classes + └── test-classes.682519136.timestamp ``` 在 `target` 目录下,您可以看到 `nebula-algorithm-1.x.y.jar` 文件。 + > **说明**:JAR 文件版本号会因 Nebula Java Client 的发布版本而异。您可以在 [nebula-java 仓库的 Releases 页面](https://github.com/vesoft-inc/nebula-java/releases "点击前往 GitHub 网站") 查看最新的 v1.x 版本。 ## 后续操作 diff --git a/docs/nebula-exchange/about-exchange/ex-ug-limitations.md b/docs/nebula-exchange/about-exchange/ex-ug-limitations.md index 4fa09ae33f..c8efd8c50f 100644 --- a/docs/nebula-exchange/about-exchange/ex-ug-limitations.md +++ b/docs/nebula-exchange/about-exchange/ex-ug-limitations.md @@ -11,7 +11,9 @@ Exchange v1.x 仅支持 Nebula Graph v1.x。如果您正在使用 Nebula Graph v Exchange v1.x 支持以下操作系统: - CentOS 7 -- Mac OS +- macOS + +> **说明**:仅 Linux 系统支持导入 SST 文件。 ## 软件依赖 diff --git a/docs/nebula-exchange/about-exchange/ex-ug-what-is-exchange.md b/docs/nebula-exchange/about-exchange/ex-ug-what-is-exchange.md index f8de0ec7fb..5e4366ad6c 100644 --- a/docs/nebula-exchange/about-exchange/ex-ug-what-is-exchange.md +++ b/docs/nebula-exchange/about-exchange/ex-ug-what-is-exchange.md @@ -23,6 +23,7 @@ Exchange 具有以下优点: - 适应性强:支持将多种不同格式或不同来源的数据导入 Nebula Graph 数据库,便于您迁移数据。 - 支持导入 SST:支持将不同来源的数据转换为 SST 文件,用于数据导入。 + > **说明**:仅 Linux 系统支持导入 SST 文件。 - 支持断点续传:导入数据时支持断点续传,有助于您节省时间,提高数据导入效率。 > **说明**:目前仅迁移 Neo4j 数据时支持断点续传。 diff --git a/docs/nebula-exchange/ex-ug-compile.md b/docs/nebula-exchange/ex-ug-compile.md index 48311ddd36..c070016618 100644 --- a/docs/nebula-exchange/ex-ug-compile.md +++ b/docs/nebula-exchange/ex-ug-compile.md @@ -1,55 +1,58 @@ # 编译 Exchange -依次运行以下命令下载并编译打包 Exchange。 +按以下步骤编译 Exchange v1.x: -```bash -git clone -b v1.0 https://github.com/vesoft-inc/nebula-java.git -cd nebula-java/tools/exchange -mvn package -DskipTests -``` +1. 克隆 `nebula-java` 源代码。 + + ```bash + git clone -b v1.0 https://github.com/vesoft-inc/nebula-java.git + ``` + +2. 切换到 `nebula-java` 目录,并打包 Nebula Java 1.x。 + + ```bash + cd nebula-java + mvn clean install -Dgpg.skip -Dmaven.javadoc.skip=true -Dmaven.test.skip=true + ``` + +3. 进入 `tools/exchange` 目录,并编译 Exchange v1.x。 + + ```bash + cd nebula-java/tools/exchange + mvn clean package -Dgpg.skip -Dmaven.javadoc.skip=true -Dmaven.test.skip=true + ``` 编译成功后,您可以在当前目录里看到如下目录结构。 ``` -. -|-- dependency-reduced-pom.xml -|-- pom.xml -|-- scripts -| |-- README.md -| |-- mock_data.py -| |-- pulsar_producer.py -| |-- requirements.txt -| `-- verify_nebula.py -|-- src -| `-- main -| |-- resources -| |-- scala -| `-- test -`-- target - |-- classes - | |-- application.conf - | |-- com - | |-- server_application.conf - | `-- stream_application.conf - |-- classes.timestamp - |-- exchange-1.x.y-javadoc.jar - |-- exchange-1.x.y-sources.jar - |-- exchange-1.x.y.jar - |-- generated-test-sources - | `-- test-annotations - |-- maven-archiver - | `-- pom.properties - |-- maven-status - | `-- maven-compiler-plugin - |-- original-exchange-1.x.y.jar - |-- site - | `-- scaladocs - |-- test-classes - | `-- com - `-- test-classes.timestamp +├── README.md +├── dependency-reduced-pom.xml +├── pom.xml +├── scripts +│ ├── README.md +│ ├── mock_data.py +│ ├── pulsar_producer.py +│ ├── requirements.txt +│ └── verify_nebula.py +├── src +│ └── main +└── target + ├── classes + ├── classes.timestamp + ├── exchange-1.x.y-javadoc.jar + ├── exchange-1.x.y-sources.jar + ├── exchange-1.x.y.jar + ├── generated-test-sources + ├── maven-archiver + ├── maven-status + ├── original-exchange-1.x.y.jar + ├── site + ├── test-classes + └── test-classes.timestamp ``` -在 `target` 目录下,您可以 `exchange-1.x.y.jar` 文件。 +在 `target` 目录下,您可以看到 `exchange-1.x.y.jar` 文件。 + > **说明**:JAR 文件版本号会因 Nebula Java Client 的发布版本而异。您可以在 [nebula-java 仓库的 Releases 页面](https://github.com/vesoft-inc/nebula-java/releases "点击前往 GitHub 网站") 查看最新的 v1.x 版本。 在迁移数据时,您可以参考 `target/classes/application.conf`、`target/classes/server_application.conf`、`target/classes/stream_application.conf` 根据实际情况修改配置文件。 diff --git a/docs/nebula-exchange/parameter-reference/ex-ug-paras-nebulagraph.md b/docs/nebula-exchange/parameter-reference/ex-ug-paras-nebulagraph.md index 3459d73758..e43298a454 100644 --- a/docs/nebula-exchange/parameter-reference/ex-ug-paras-nebulagraph.md +++ b/docs/nebula-exchange/parameter-reference/ex-ug-paras-nebulagraph.md @@ -4,13 +4,13 @@ | 参数 | 默认值 | 数据类型 | 是否必需 | 说明 | | :--- | :--- | :--- | :--- | :--- | -| `nebula.address.graph` | 无 | `list[string]` | 是 | Nebula Graph 图数据库 Graph 服务的地址列表。如果有多个地址,以英文逗号(,)分隔。 | -| `nebula.address.meta` | 无 | `list[string]` | 是 | Nebula Graph 图数据库 Meta 服务的地址列表。如果有多个地址,以英文逗号(,)分隔。 | +| `nebula.address.graph` | 无 | `list[string]` | 是 | Nebula Graph 图数据库 Graph 服务的地址列表。如果有多个地址,以英文逗号(,)分隔。格式为 `"ip1:port","ip2:port","ip3:port"`。 | +| `nebula.address.meta` | 无 | `list[string]` | 是 | Nebula Graph 图数据库 Meta 服务的地址列表。如果有多个地址,以英文逗号(,)分隔。格式为 `"ip1:port","ip2:port","ip3:port"`。 | | `nebula.user` | `user` | `string` | 是 | 数据库用户名,默认为 `user` 。如果 Nebula Graph 启用了身份认证:
- 如果未创建不同用户,使用 `root` 。
- 如果已经创建了不同的用户并且分配了指定空间的角色,则使用对该空间拥有写操作权限的用户。 | | `nebula.pswd` | `password` | `string` | 是 | 数据库用户名对应的密码,默认 `user` 的密码为 `password` 。如果 Nebula Graph 启用了身份认证:
- 使用 `root` 时,密码为 `nebula` 。
- 使用其他用户账号时,设置账号对应的密码。 | | `nebula.space` | 无 | `string` | 是 | 导入数据对应的图空间(Space)名称。 | | `nebula.connection.timeout` | 3000 | `int` | 否 | Thrift 连接的超时时间,单位为 ms。 | | `nebula.connection.retry` | 3 | `int` | 否 | Thrift 连接重试次数。 | | `nebula.execution.retry` | 3 | `int` | 否 | nGQL 语句执行重试次数。 | -| `nebula.error.max` | 32 | `int` | 否 | | +| `nebula.error.max` | 32 | `int` | 否 | 指定导入过程中的最大失败次数。当失败次数达到最大值时,提交的 Spark 作业将自动停止。 | | `nebula.error.output` | 无 | `string` | 是 | 在 Nebula Graph 服务器上指定输出错误信息的日志路径。您可以在这个文件里查看发生的所有错误信息。 | diff --git a/docs/nebula-exchange/use-exchange/ex-ug-import-sst.md b/docs/nebula-exchange/use-exchange/ex-ug-import-sst.md index 4cef0f673e..44fa2f5232 100644 --- a/docs/nebula-exchange/use-exchange/ex-ug-import-sst.md +++ b/docs/nebula-exchange/use-exchange/ex-ug-import-sst.md @@ -2,6 +2,8 @@ Nebula Exchange 能将不同来源的数据转换成 SST 文件后再导入 Nebula Graph 数据库中。本文描述 Exchange 将源数据转换为 SST 文件并导入 Nebula Graph 的实现原理,并提供示例说明如何修改配置文件完成 SST 文件导入操作。 +> **说明**:仅 Linux 系统支持导入 SST 文件。 + ## 实现方法 Nebula Graph 底层使用 RocksDB 作为键值型存储引擎。RocksDB 是基于磁盘的存储引擎,数据以 Sorted String Table(SSTable)格式存放。SSTable 是一个内部包含了任意长度、排好序的键值对 <key,value> 集合的文件,用于高效地存储大量的键值型数据。 diff --git a/docs/nebula-flink/nf-ug-compile.md b/docs/nebula-flink/nf-ug-compile.md index 909e53980a..9be5403594 100644 --- a/docs/nebula-flink/nf-ug-compile.md +++ b/docs/nebula-flink/nf-ug-compile.md @@ -1,29 +1,47 @@ # 编译 Nebula Flink Connector -逐行运行以下命令编译 Nebula Flink Connector。 +按以下步骤编译 Nebula Flink Connector v1.x: -```bash -$ git clone -b v1.0 https://github.com/vesoft-inc/nebula-java.git -$ cd nebula-java/tools/nebula-flink -$ mvn clean compile package install -Dgpg.skip -Dmaven.javadoc.skip=true -``` +1. 克隆 `nebula-java` 源代码。 -编译成功后,您可以在 `nebula-flink/target/` 目录下看到 `nebula-flink-1.x.y.jar` 文件,如下所示。将这个文件复制到本地 Maven 库的 `com/vesoft/nebula-flink/` 目录中。 + ```bash + git clone -b v1.0 https://github.com/vesoft-inc/nebula-java.git + ``` -> **说明**:JAR 文件版本号会因 Nebula Java Client 的发布版本而异。您可以在 [nebula-java 仓库的 Releases 页面](https://github.com/vesoft-inc/nebula-java/releases "点击前往 GitHub 网站") 查看最新的 v1.x 版本。 +2. 切换到 `nebula-java` 目录,并打包 Nebula Java 1.x。 + + ```bash + cd nebula-java + mvn clean install -Dgpg.skip -Dmaven.javadoc.skip=true -Dmaven.test.skip=true + ``` + +3. 进入 `tools/nebula-flink` 目录,并编译 Nebula Flink Connector v1.x。 + + ```bash + cd nebula-java/tools/nebula-flink + mvn clean package -Dgpg.skip -Dmaven.javadoc.skip=true -Dmaven.test.skip=true + ``` + +编译成功后,您可以在当前目录里看到如下目录结构。在 `target` 目录下,您可以看到 `nebula-flink-1.x.y.jar` 文件。将这个文件复制到本地 Maven 库的 `com/vesoft/nebula-flink/` 目录中。 ```text -. -├── classes -├── generated-sources -├── generated-test-sources -├── maven-archiver -├── maven-status -├── nebula-flink-1.x.y-sources.jar -├── nebula-flink-1.x.y-test-sources.jar -├── nebula-flink-1.x.y-tests.jar -├── nebula-flink-1.x.y.jar -├── original-nebula-flink-1.x.y.jar -├── surefire-reports -└── test-classes +├── README.md +├── pom.xml +├── src +│ ├── main +│ └── test +└── target + ├── classes + ├── generated-sources + ├── generated-test-sources + ├── maven-archiver + ├── maven-status + ├── nebula-flink-1.x.y-sources.jar + ├── nebula-flink-1.x.y-test-sources.jar + ├── nebula-flink-1.x.y-tests.jar + ├── nebula-flink-1.x.y.jar + ├── original-nebula-flink-1.x.y.jar + └── test-classes ``` + +> **说明**:JAR 文件版本号会因 Nebula Java Client 的发布版本而异。您可以在 [nebula-java 仓库的 Releases 页面](https://github.com/vesoft-inc/nebula-java/releases "点击前往 GitHub 网站") 查看最新的 v1.x 版本。 diff --git a/docs/spark-connector/sc-ug-compile.md b/docs/spark-connector/sc-ug-compile.md index ee14b53e51..3531e22e2d 100644 --- a/docs/spark-connector/sc-ug-compile.md +++ b/docs/spark-connector/sc-ug-compile.md @@ -1,35 +1,43 @@ # 编译 Nebula Spark Connector -逐行运行以下命令编译 Nebula Spark Connector。 +按以下步骤编译 Nebula Spark Connector v1.x: -```bash -$ git clone -b v1.0 https://github.com/vesoft-inc/nebula-java.git -$ cd nebula-java/tools/nebula-spark -$ mvn clean compile package install -Dgpg.skip -Dmaven.javadoc.skip=true -``` +1. 克隆 `nebula-java` 源代码。 -编译成功后,您可以在 `nebula-spark/target/` 目录下看到 `nebula-spark-1.x.y.jar` 文件,如下图所示。 + ```bash + git clone -b v1.0 https://github.com/vesoft-inc/nebula-java.git + ``` -> **说明**:JAR 文件版本号会因 Nebula Java Client 的发布版本而异。您可以在 [nebula-java 仓库的 Releases 页面](https://github.com/vesoft-inc/nebula-java/releases "点击前往 GitHub 网站") 查看最新的 v1.x 版本。 +2. 切换到 `nebula-java` 目录,并打包 Nebula Java 1.x。 + + ```bash + cd nebula-java + mvn clean install -Dgpg.skip -Dmaven.javadoc.skip=true -Dmaven.test.skip=true + ``` + +3. 进入 `tools/nebula-spark` 目录,并编译 Nebula Spark Connector v1.x。 -将这个文件复制到本地 Maven 库以下路径 `com/vesoft/nebula-spark/`。 + ```bash + cd nebula-java/tools/nebula-spark + mvn clean package -Dgpg.skip -Dmaven.javadoc.skip=true -Dmaven.test.skip=true + ``` + +编译成功后,您可以在当前目录里看到如下目录结构。在 `target` 目录下,您可以看到 `nebula-spark-1.x.y.jar` 文件。将这个文件复制到本地 Maven 库以下路径 `com/vesoft/nebula-spark/`。 ```text -. -├── classes -│   ├── META-INF -│   │   └── services -│   └── com -│   └── vesoft -├── classes.-1151735588.timestamp -├── generated-sources -│   └── annotations -├── maven-archiver -│   └── pom.properties -├── maven-status -│   └── maven-compiler-plugin -│   └── compile -├── nebula-spark-1.x.y-tests.jar -├── nebula-spark-1.x.y.jar -└── original-nebula-spark-1.x.y.jar +├── README.md +├── pom.xml +├── src +│ └── main +└── target + ├── classes + ├── classes.-1146581144.timestamp + ├── generated-sources + ├── maven-archiver + ├── maven-status + ├── nebula-spark-1.x.y-tests.jar + ├── nebula-spark-1.x.y.jar + └── original-nebula-spark-1.x.y.jar ``` + +> **说明**:JAR 文件版本号会因 Nebula Java Client 的发布版本而异。您可以在 [nebula-java 仓库的 Releases 页面](https://github.com/vesoft-inc/nebula-java/releases "点击前往 GitHub 网站") 查看最新的 v1.x 版本。