Configuration variable in Hive
Hive follows the Hadoop configuration guideline.
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 |
+----------------------------+--+
–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
set;
-- Show only the value set
set;
-- Show only the value not set with their default.
set -v;
set hive.execution.engine;
+----------------------------+--+
| set |
+----------------------------+--+
| hive.execution.engine=tez |
+----------------------------+--+
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 |
+----------+---------+-------------------------------------------------------------------------------------------------------------------------------+--+
Example of Hive Home location:
export HIVE_CONF_DIR=${HIVE_CONF_DIR:-/usr/hdp/current/hive-client/conf}