Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Hive SVN repository is located here: http://svn.apache.org/repos/asf/hive/trunk.

As of 0.13, Hive is built using Maven.  To build Hive against 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)

Here, {version} refers to the current Hive version.

In the rest of the page If building Hive source using Maven, we will refer to this the directory "/packaging/target/apache-hive-{version}-SNAPSHOT-bin/apache-hive-{version}-SNAPSHOT-bin" as <install-dir> in the rest of the page.

Compile Hive on Hadoop 0.20

To build Hive against Hadoop 0.20, build instead with the following Maven profile:

No Format
  $ svnmvn clean co http://svninstall -Phadoop-1,dist

Compiling Hive Prior to 0.13

Prior to Hive 0.13, Hive was built using Ant.  To build an older version of Hive:

No Format
  $ svn co http://svn.apache.org/repos/asf/hive/trunk hive
  $ cd hive
  $ mvnant clean install -Phadoop-1,dist 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 on Hadoop 23

This compiles Hive in Ant against Hadoop 0.23, 2.0.0, or later, build instead with the following flags:

No Format
  $ ant clean package -Dhadoop.version=0.23.3 -Dhadoop-0.23.version=0.23.3 -Dhadoop.mr.rev=23
  $ ant clean package -Dhadoop.version=2.0.0-alpha -Dhadoop-0.23.version=2.0.0-alpha -Dhadoop.mr.rev=23

Running Hive

Hive uses Hadoop, so:

...