Rate This Document
Findability
Accuracy
Completeness
Readability

Compiling Druid

  1. 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
    
  2. Switch to the directory where the Druid source package is decompressed.
    1
    cd druid-0.12.1
    
  3. Modify the pom.xml file.
    1. Open the file.
      1
      vi pom.xml
      
    2. 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>
      

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Modify the java-util/pom.xml file.
    1. Open the file.
      1
      vi java-util/pom.xml
      
    2. 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>
      

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  5. Perform compilation.
    1
    mvn package -DskipTests
    

    Obtain the .tar.gz package generated in the distribution/target/ directory.

  6. 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 .