Compiling Druid
- Download the source code and decompress it.
1 2 3
wget https://github.com/apache/druid/archive/druid-0.12.1.tar.gz tar -xvf druid-0.12.1.tar.gz mv druid-druid-0.12.1 druid-0.12.1
- Switch to the directory where the Druid source package is decompressed.
1cd druid-0.12.1
- Modify the pom.xml file.
- Open the file.
1vi pom.xml - Press i to enter the insert mode and add the Kunpeng Maven repository source from line 1295 in the file.
1 2 3 4 5 6 7
<repositories> <repository> <id>kunpengmaven</id> <name>kunpeng maven</name> <url>https://mirrors.huaweicloud.com/kunpeng/maven</url> </repository> </repositories>

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Modify the java-util/pom.xml file.
- Open the file.
1vi java-util/pom.xml - Press i to enter the insert mode. From line 271 in the file, modify download path of sigar-dist-1.6.5.132.zip.
1 2
<!--<url>https://repository.jboss.org/nexus/content/repositories/thirdparty-uploads/</url>--> <url>http://porting-dependence.obs.cn-north-4.myhuaweicloud.com/ARTIFACTS/</url>

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Perform compilation.
1mvn package -DskipTests
Obtain the .tar.gz package generated in the distribution/target/ directory.

- Use the Kunpeng Porting Advisor to scan the .tar package generated after compilation and ensure that the .tar package contains no x86 .so or .jar packages.
- The compiled package druid-0.12.1-bin.tar.gz must be scanned by using the Kunpeng Porting Advisor to ensure that no x86 .so or .jar packages are contained. If the compiled package contains x86 .so or .jar packages, the component functions may be affected.
- For details about how to use the Kunpeng Porting Advisor, see .
Parent topic: Porting Guide (CentOS & openEuler)