Downloading an MR3 release
Download an MR3 release and uncompress it.
We rename the new directory to
$ wget https://github.com/mr3project/mr3-release/releases/download/v1.9/hivemr3-1.9-hive3.1.3-k8s.tar.gz
$ gunzip -c hivemr3-1.9-hive3.1.3-k8s.tar.gz | tar xvf -;
$ mv hivemr3-1.9-hive3.1.3-k8s mr3-run
$ cd mr3-run
Then the user can rebuild Hive on MR3 from the source code of two additional components: Tez for MR3 and Hive for MR3. As the MR3 release is built with Java 8, we assume that Java 8 is already installed.
Cloning GitHub repositories
For Tez for MR3, clone the GitHub repository (https://github.com/mr3project/tez-mr3.git) and check out the branch corresponding to the MR3 release.
$ git clone https://github.com/mr3project/tez-mr3.git -b master --single-branch tez-mr3
For Hive for MR3, clone the GitHub repository (https://github.com/mr3project/hive-mr3.git) and check out the branch corresponding to the Hive version.
$ git clone https://github.com/mr3project/hive-mr3.git -b master3 --single-branch hive-mr3
Setting environment variables
Set the following environment variables in
env.sh in the MR3 release
to specify the directories of the source code.
$ vi mr3-run/env.sh
Because of the compilation dependency between Hive and Tez,
the user should rebuild first Tez for MR3 and then Hive for MR3.
To compile Tez for MR3, execute
tez/compile-tez.sh in the MR3 release.
In order to access Amazon S3 (on Amazon EMR or EKS), use an additional option
$ mr3-run/tez/compile-tez.sh -P aws
To compile Hive for MR3, execute
hive/compile-hive.sh in the MR3 release with the following options:
--hivesrc3 # Choose hive3-mr3 (based on Hive 3.1.3) (default).
$ mr3-run/hive/compile-hive.sh --hivesrc3
The user can append as many Maven options as necessary to the command.
These scripts invoke Maven to compile the source code, and automatically update the local Maven repository
as well as
tez/tezjar directories in the MR3 release.
they also upload the new jar files to HDFS,
so the user does not need to execute
tez/upload-hdfslib-tez.sh in the MR3 release later.