Hive - Configuration (Variable)
About
Configuration variable in Hive
Hive follows the Hadoop configuration guideline.
Articles Related
Properties
Level of persistence
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 |
+----------------------------+--+
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
Application
Management
List
set;
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 |
+----------------------------+--+
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 |
+----------+---------+-------------------------------------------------------------------------------------------------------------------------------+--+
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}