Versions Compared

Key

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

...

Code Block
  $ svn co http://svn.apache.org/repos/asf/hive/trunk hive
  $ cd hive
  $ ant clean package
  $ cd build/dist
  $ ls
  README.txt
  bin/ (all the shell scripts)
  lib/ (required jar files)
  conf/ (configuration files)
  examples/ (sample input and query files)

In the rest of the page , we use build/dist and <install-dir> interchangeably.

...

Running Hive

Hive uses hadoop that means; as prerequisites:

  • you must have hadoop in your path OR
  • export HADOOP_HOME=<hadoop-install-dir>

In addition, you must create /tmp and /user/hive/warehouse
(aka hive.metastore.warehouse.dir) and set them chmod g+w in
HDFS before you can create a table can be created in Hive.

Commands to perform this setup

Code Block
  $ $HADOOP_HOME/bin/hadoop fs -mkdir       /tmp
  $ $HADOOP_HOME/bin/hadoop fs -mkdir       /user/hive/warehouse
  $ $HADOOP_HOME/bin/hadoop fs -chmod g+w   /tmp
  $ $HADOOP_HOME/bin/hadoop fs -chmod g+w   /user/hive/warehouse

I also You may find it useful but , though it's not necessary, to set HIVE_HOME

Code Block
  $ export HIVE_HOME=<hive-install-dir>

To use the hive command line interface (cli) from the shell:

...

Configuration management overview

  • Hive by default gets its configuration is stored in from <install-dir>/conf/hive-default.xml
  • The location of the Hive configuration directory can be changed by setting the HIVE_CONF_DIR environment variable.
  • Configuration variables can be changed by (re-)defining them in <install-dir>/conf/hive-site.xmlThe location of the Hive configuration directory can be changed by setting the HIVE_CONF_DIR environment variable.
  • Log4j configuration is stored in <install-dir>/conf/hive-log4j.properties
  • Hive configuration is an overlay on top of hadoop - meaning it inherits the hadoop configuration variables are inherited by default.
  • Hive configuration can be manipulated by:

...