hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "Hive/DeveloperGuide" by JoydeepSensarma
Date Wed, 08 Apr 2009 06:40:43 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The following page has been changed by JoydeepSensarma:

The comment on the change is:
add notes about compiling hive

  ==== Operators ====
  ==== UDFs and UDAFs ====
+ == Compiling Hive ==
+ Hive can be made to compile against different versions of Hadoop.
+ === Default Mode ===
+ From the root of the source tree:
+ {{{
+ ant package
+ }}}
+ will make Hive compile against hadoop version 0.19.0. Note that:
+  * Hive uses Ivy to download the hadoop-0.19.0 distribution. However once downloaded, it's
cached and not downloaded multiple times
+  * This will create a distribution directory in build/dist (relative to the source root)
from where one can launch Hive. This distribution should only be used to execute queries against
hadoop branch 0.19. (Hive is not sensitive to minor revisions of Hadoop versions).
+ === Advanced Mode ===
+  * One can specify a custom distribution directory by using:
+ {{{
+ ant -Dtarget.dir=<my-install-dir> package
+ }}}
+  * One can specify a version of hadoop other than 0.19.0 by using (using 0.17.1 as an example):
+ {{{
+ ant -Dhadoop.version=0.17.1 package
+ }}}
+  * One can also compile against a custom version of the Hadoop tree (only release 0.4 and
above). This is also useful if running Ivy is problematic (in disconnected mode for example)
- but a hadoop tree is available. This can be done by specifying the root of the hadoop source
tree to be used, for example:
+ {{{
+ ant -Dhadoop.root=~/src/hadoop-19/build/hadoop-0.19.2-dev -Dhadoop.version=0.19.2-dev
+ }}}
+ note that:
+   * hive's build script assumes that {{{hadoop.root}}} is pointing to a distribution tree
for hadoop created by running ant package in hadoop
+   * {{{hadoop.version}}} must match the version used in building hadoop
+ In this particular example - {{{~/src/hadoop-19}}} is a checkout of the hadoop 19 branch
that uses {{{0.19.2-dev}}} as default version and creates a distribution directory in {{{build/hadoop-0.19.2-dev}}}
by default.
  == Unit tests ==
  === Layout of the unit tests ===
  Hive uses junit for unit tests. Each of the 3 main components of Hive have their unit test
implementations in the corresponding src/test directory e.g. trunk/metastore/src/test has
all the unit tests for metastore, trunk/serde/src/test has all the unit tests for serde and
trunk/ql/src/test has all the unit tests for the query processor. The metastore and serde
unit tests provide the !TestCase implementations for junit. The query processor tests on the
other hand are generated using Velocity. The main directories under trunk/ql/src/test that
contain these tests and the corresponding results are as follows:

View raw message