Compile Exchange¶
This topic describes how to compile Nebula Exchange. Users can also download the compiled .jar
file directly.
Prerequisites¶
- Install Maven.
- Download pulsar-spark-connector_2.11, and unzip it to
io/streamnative/connectors
directory of the local Maven library.
Steps¶
-
Clone the repository
nebula-spark-utils
in the/
directory.git clone -b v2.5.1 https://github.com/vesoft-inc/nebula-spark-utils.git
-
Switch to the directory
nebula-exchange
.cd nebula-spark-utils/nebula-exchange
-
Package Nebula Exchange.
mvn clean package -Dmaven.test.skip=true -Dgpg.skip -Dmaven.javadoc.skip=true
After the compilation is successful, you can view a directory structure similar to the following in the current directory.
.
├── 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
In the target
directory, users can find the exchange-2.x.y.jar
file.
Note
The JAR file version changes with the release of the Nebula Java Client. Users can view the latest version on the Releases page.
When migrating data, you can refer to configuration file target/classes/application.conf
.
Failed to download the dependency package¶
If downloading dependencies fails at compile time:
- Check the network Settings and ensure that the network is normal.
-
Modify the
mirror
part of Maven installation directorylibexec/conf/settings.xml
:<mirror> <id>alimaven</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/repositories/central/</url> </mirror>