From cb85074fbb8777bd5a8c3ec8baf1b98e5563a637 Mon Sep 17 00:00:00 2001 From: randomJoe211 <69501902+randomJoe211@users.noreply.github.com> Date: Fri, 7 Jan 2022 15:14:01 +0800 Subject: [PATCH] Update exchange compilation steps (#1364) --- docs-2.0/nebula-exchange/ex-ug-compile.md | 72 +++++++++++------------ 1 file changed, 33 insertions(+), 39 deletions(-) diff --git a/docs-2.0/nebula-exchange/ex-ug-compile.md b/docs-2.0/nebula-exchange/ex-ug-compile.md index 9e2b1538153..566bbf330bb 100644 --- a/docs-2.0/nebula-exchange/ex-ug-compile.md +++ b/docs-2.0/nebula-exchange/ex-ug-compile.md @@ -4,7 +4,7 @@ ## 直接下载 JAR 文件 -社区版 Exchange 的 JAR 文件可以直接[下载](https://repo1.maven.org/maven2/com/vesoft/nebula-exchange/)。 +社区版 Exchange 的 JAR 文件可以直接[下载](https://github.com/vesoft-inc/nebula-exchange/releases)。 要下载企业版 Exchange,需先[获取 Nebula Graph 企业版套餐](https://nebula-graph.com.cn/pricing/)。 @@ -19,52 +19,46 @@ ### 前提条件 - 安装 [Maven](https://maven.apache.org/download.cgi)。 - - -- 下载 [pulsar-spark-connector_2.11](https://oss-cdn.nebula-graph.com.cn/jar-packages/pulsar-spark-connector_2.11.zip),解压到本地 Maven 库的目录`io/streamnative/connectors`中。 +- 根据数据源安装需要的 Spark 版本,从各数据源导出数据支持的 Spark 版本参见[软件依赖](about-exchange/ex-ug-limitations.md)。 ### 操作步骤 1. 在根目录克隆仓库`nebula-exchange`。 - ```bash - git clone -b {{exchange.branch}} https://github.com/vesoft-inc/nebula-exchange.git - ``` + ```bash + git clone -b {{exchange.branch}} https://github.com/vesoft-inc/nebula-exchange.git + ``` 2. 切换到目录`nebula-exchange`。 - ```bash - cd nebula-exchange/nebula-exchange - ``` - -3. 打包 Nebula Exchange。 - - ```bash - mvn clean package -Dmaven.test.skip=true -Dgpg.skip -Dmaven.javadoc.skip=true - ``` - -编译成功后,用户可以在当前目录里查看到类似如下目录结构。 - -```text -. -├── README-CN.md -├── README.md -├── pom.xml -├── src -│   ├── main -│   └── test -└── target - ├── classes - ├── classes.timestamp - ├── maven-archiver - ├── nebula-exchange-2.x.y-javadoc.jar - ├── nebula-exchange-2.x.y-sources.jar - ├── nebula-exchange-2.x.y.jar - ├── original-nebula-exchange-2.x.y.jar - └── site -``` - -在`target`目录下,用户可以找到`exchange-2.x.y.jar`文件。 + ```bash + cd nebula-exchange + ``` + +3. 根据 Exchange 使用环境中的 Spark 版本打包 Exchange。 + + - Spark 2.2: + + ```bash + mvn clean package -Dmaven.test.skip=true -Dgpg.skip -Dmaven.javadoc.skip=true \ + -pl nebula-exchange_spark_2.2 -am -Pscala-2.11 -Pspark-2.2 + ``` + + - Spark 2.4: + + ```bash + mvn clean package -Dmaven.test.skip=true -Dgpg.skip -Dmaven.javadoc.skip=true \ + -pl nebula-exchange_spark_2.4 -am -Pscala-2.11 -Pspark-2.4 + ``` + + - Spark 3.0: + + ```bash + mvn clean package -Dmaven.test.skip=true -Dgpg.skip -Dmaven.javadoc.skip=true \ + -pl nebula-exchange_spark_3.0 -am -Pscala-2.12 -Pspark-3.0 + ``` + +编译成功后,可以在`nebula-exchange_spark_x.x/target/`目录里找到`nebula-exchange_spark_x.x-{{exchange.branch}}.jar`文件。`x.x`代表 Spark 版本,例如`2.4`。 !!! note JAR 文件版本号会因 Nebula Java Client 的发布版本而变化。用户可以在 [Releases 页面](https://github.com/vesoft-inc/nebula-java/releases)查看最新版本。