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

- 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")

- 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"

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

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Perform compilation.
1sbt 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
- Go to the source code directory.
1cd hive-warehouse-connector-release-HDP-3.0.1.0-187-tag
- Modify the build.sbt file.
- Open the file.
1vi build.sbt - Press i to enter the insert mode and modify the version in line 7:
1val versionString = sys.props.getOrElse("version","1.0.0.3.0.1.0-187")

- 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")

- 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"

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

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Perform compilation.
1sbt assembly
The compiled package is stored in the ./target/scala-2.11/ directory.
