You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Installing Hive

Installing Hive is simple and only requires having Java 1.6 and Ant installed on your machine.

Hive is available via SVN at http://svn.apache.org/repos/asf/hive/trunk. You can download it by running the following command.

$ svn co http://svn.apache.org/repos/asf/hive/trunk hive

To build Hive, execute the following command on the base directory:

$ ant package

It will create the subdirectory build/dist with the following contents:

  • README.txt: readme file.
  • bin/: directory containing all the shell scripts
  • lib/: directory containing all required jar files
  • conf/: directory with configuration files
  • examples/: directory with sample input and query files

Subdirectory build/dist should contain all the files necessary to run Hive. You can run it from there or copy it to a different location, if you prefer.

In order to run Hive, you must have Hadoop in your path or have defined the environment variable HADOOP_HOME with the Hadoop installation directory.

Moreover, we strongly advise users to create the HDFS directories /tmp and /user/hive/warehouse (also known as hive.metastore.warehouse.dir) and set them chmod g+w before tables are created in Hive.

To use the Hive command line interface (cli) go to the Hive home directory (the one with the contents of build/dist) and execute the following command:

$ bin/hive

Metadata is stored in an embedded Derby database whose disk storage location is determined by the Hive configuration variable named javax.jdo.option.ConnectionURL. By default, this location is ./metastore_db (see conf/hive-default.xml).

Using Derby in embedded mode allows at most one user at a time. To configure Derby to run in server mode, see Hive Using Derby in Server Mode.

Next Step: Configuring Hive.

Installing HCatalog

Version

HCatalog is installed with Hive, starting with Hive release 0.11.0.

If you install Hive from the binary tarball, the hcat command is available in the hcatalog/bin directory. However, most hcat commands can be issued as hive commands except for "hcat -g" and "hcat -p". Note that the hcat command uses the -p flag for permissions but hive uses it to specify a port number. The HCatalog CLI is documented here and the Hive CLI is documented here.

HCatalog installation is documented here.

Installing WebHCat (Templeton)

Version

WebHCat is installed with Hive, starting with Hive release 0.11.0.

If you install Hive from the binary tarball, the WebHCat server command webhcat_server.sh is in the hcatalog/sbin directory.

WebHCat installation is documented here.

  • No labels