Hive - Configuration (Variable)

> Database > Apache - Hive (HS|Hive Server)

1 - About

Configuration variable in Hive

Hive follows the Hadoop configuration guideline.

Advertising

3 - Properties

4 - Level of persistence

4.1 - Command

The configuration are variable

You can then use the set command to see or set them

Example: Which engine ?

SET hive.execution.engine;
+----------------------------+--+
|            set             |
+----------------------------+--+
| hive.execution.engine=tez  |
+----------------------------+--+

4.2 - Session

–hiveconf options. Example for the scratch directory

bin/hive or bin/beeline --hiveconf hive.exec.scratchdir=/tmp/mydir

Example:

hive --hiveconf hive.tez.container.size=1024
Advertising

4.3 - Application

5 - Management

5.1 - List

SET;

5.2 - See

  • All
-- Show only the value set
SET;
-- Show only the value not set with their default.
SET -v;
  • One: Which engine ?
SET hive.execution.engine;
+----------------------------+--+
|            set             |
+----------------------------+--+
| hive.execution.engine=tez  |
+----------------------------+--+

5.3 - Show

The SHOW CONF command is a SQL command. You need to be connected.

SHOW conf 'hive.execution.engine' ;
+----------+---------+-------------------------------------------------------------------------------------------------------------------------------+--+
| default  |  type   |                                                             desc                                                              |
+----------+---------+-------------------------------------------------------------------------------------------------------------------------------+--+
| mr       | STRING  | Expects one of [mr, tez, spark]. Chooses execution engine. Options are: mr (Map reduce, default), tez (hadoop 2 only), spark  |
+----------+---------+-------------------------------------------------------------------------------------------------------------------------------+--+
Advertising

5.4 - Directory

Example of Hive Home location:

  • /etc/hive/2.6.2.3-1/0
  • Hortonworks distribution
export HIVE_CONF_DIR=${HIVE_CONF_DIR:-/usr/hdp/current/hive-client/conf}

6 - Documentation / Reference

db/hive/conf.txt · Last modified: 2019/06/04 15:30 by gerardnico