Rate This Document
Findability
Accuracy
Completeness
Readability

Compilation Process

Prerequisites

You have downloaded and decompressed the hive-warehouse-connector-assembly source package.

Compiling hive-warehouse-connector-assembly-1.0.0.3.1.0.0-78.jar

  1. Go to the source code directory.
    1
    cd hive-warehouse-connector-release-HDP-3.1.0.0-78-tag
    
  2. Modify the build.sbt file.
    1. Open the file.
      1
      vi build.sbt
      
    2. Press i to enter the insert mode and modify the version in line 7:
      1
      val versionString = sys.props.getOrElse("version","1.0.0.3.1.0.0-78")
      

    3. Change the versions of Hadoop, Hive, and Tez in lines 15, 16, and 18.
      1
      2
      3
      4
      val hadoopVersion = sys.props.getOrElse("hadoop.version", "3.1.1.3.1.0.0-78")
      val hiveVersion = sys.props.getOrElse("hive.version", "3.1.0.3.1.0.0-78")
      ....
      val tezVersion = sys.props.getOrElse("tez.version", "0.9.1.3.1.0.0-78")
      

    4. Add the Kunpeng Maven and Huawei Maven in lines 338 and 339.
      1
      2
      resolvers += "Kunpeng Maven" at "https://mirrors.huaweicloud.com/kunpeng/maven"
      resolvers += "huawei Maven" at "https://mirrors.huaweicloud.com/repository/maven"
      

    5. Add the following statement to line 342:
      1
       externalResolvers := Resolver.withDefaultResolvers(resolvers.value, mavenCentral = false)
      

    6. Press Esc, type :wq!, and press Enter to save the file and exit.
  3. Perform compilation.
    1
    sbt assembly
    

    The compiled package is stored in the ./target/scala-2.11/ directory.

Compiling hive-warehouse-connector-assembly-1.0.0.3.0.1.0-187.jar

  1. Go to the source code directory.
    1
    cd hive-warehouse-connector-release-HDP-3.0.1.0-187-tag
    
  2. Modify the build.sbt file.
    1. Open the file.
      1
      vi build.sbt
      
    2. Press i to enter the insert mode and modify the version in line 7:
      1
      val versionString = sys.props.getOrElse("version","1.0.0.3.0.1.0-187")
      

    3. Change the versions of Hadoop, Hive, and Tez in lines 15, 16, and 18.
      1
      2
      3
      4
      val hadoopVersion = sys.props.getOrElse("hadoop.version", "3.1.1.3.0.1.0-187")
      val hiveVersion = sys.props.getOrElse("hive.version", "3.1.0.3.0.1.0-187")
      ....
      val tezVersion = sys.props.getOrElse("tez.version", "0.9.1.3.0.1.0-187")
      

    4. Add the Kunpeng Maven and Huawei Maven in lines 338 and 339.
      1
      2
      resolvers += "Kunpeng Maven" at "https://mirrors.huaweicloud.com/kunpeng/maven"
      resolvers += "huawei Maven" at "https://mirrors.huaweicloud.com/repository/maven"
      

    5. Add the following statement to line 342:
      1
       externalResolvers := Resolver.withDefaultResolvers(resolvers.value, mavenCentral = false)
      

    6. Press Esc, type :wq!, and press Enter to save the file and exit.
  3. Perform compilation.
    1
    sbt assembly
    

    The compiled package is stored in the ./target/scala-2.11/ directory.