...
Installation and Configuration
You can install a stable release of Hive by downloading a tarball, or you can download the source code and build Hive from that.
Requirements
- Java 1.6
- Hadoop 0.20.x, 0.23.x, or 2.0.x-alpha
...
Next you need to unpack the tarball. This will result in the creation of a subdirectory named hive-x.y.z
(where x.y.z
is the release number):
No Format |
---|
$ tar -xzvf hive-x.y.z.tar.gz |
...
Building Hive from Source
The Hive SVN repository for the most recent Hive code is located here: http://svn.apache.org/repos/asf/hive/trunk. The repository for branches containing released versions is located here: http://svn.apache.org/repos/asf/hive/branches. All of the release versions are in subdirectories named "branch-0.#" (except "branch-0.8-r2"); any subdirectories with other names are for works-in-progress.
As of 0.13, Hive is built using Maven.
Compile Hive on Hadoop 0.23
To build the current Hive code on Hadoop 0.23 or later:
No Format |
---|
$ svn co http://svn.apache.org/repos/asf/hive/trunk hive $ cd hive $ mvn clean install -Phadoop-2,dist $ cd packaging/target/apache-hive-{version}-SNAPSHOT-bin/apache-hive-{version}-SNAPSHOT-bin $ ls LICENSE NOTICE README.txt RELEASE_NOTES.txt bin/ (all the shell scripts) lib/ (required jar files) conf/ (configuration files) examples/ (sample input and query files) hcatalog / (hcatalog installation) scripts / (upgrade scripts for hive-metastore) |
...
No Format |
---|
$ svn co http://svn.apache.org/repos/asf/hive/trunk/branches/branch-{version} hive $ cd hive $ ant clean package $ cd build/dist # ls LICENSE NOTICE README.txt RELEASE_NOTES.txt bin/ (all the shell scripts) lib/ (required jar files) conf/ (configuration files) examples/ (sample input and query files) hcatalog / (hcatalog installation) scripts / (upgrade scripts for hive-metastore) |
...
If using Ant, we will refer to the directory "build/dist
" as <install-dir>
.
Compile Hive Prior to 0.13 on Hadoop 0.23
To build Hive in Ant against Hadoop 0.23, 2.0.0, or other version, build with the appropriate flag; some examples below:
...