...
Using the set command in the cli CLI for setting session level values for the configuration variable for all statements subsequent to the set command. e.g.
No Format set hive.exec.scratchdir=/tmp/mydir;
For example, the following command sets the scratch directory (which is used by hive Hive to store temporary output and plans) to to
/tmp/mydir
for all subseq for all subsequent statements:No Format set hive.exec.scratchdir=/tmp/mydir;
Using the Using
--hiveconf
option on the cli of thehive
command (in the CLI) or thebeeline
command for the entire session. e.g.For example:No Format bin/hive --hiveconf hive.exec.scratchdir=/tmp/mydir
In
hive-site.xml
. This is used for setting values for the entire Hive configuration. e.g.For example:No Format <property> <name>hive.exec.scratchdir</name> <value>/tmp/mydir</value> <description>Scratch space for Hive jobs</description> </property>
hive-site.xml and hive-default.xml.template
hive-default.xml.template
contains the default values for various configuration variables that come prepackaged in a Hive distribution. In order to override any of the values, create hive-site.xml
instead and set the value in that file as shown above.
hive-default.xml.template
is located in the conf
directory in your installation root, and hive-site.xml
should also be created in the same directory.
Please note that this the template file is hive-default.xml.template
is not used by Hive at all (as of Hive 0.9.0) and so it might be out of date or out of sync with the actual values. The – the canonical list of configuration options is now only managed in the the HiveConf
java java class. The template file has the formatting needed for hive-defaultsite.xml.template
is located in the conf
directory in your installation root. , so you can paste configuration variables from the template file into hive-site.xml
should also be created in the same directory and then change their values to the desired configuration.
In Hive releases 0.9.0 through 0.13.1, the template file does not necessarily contain all configuration options found in HiveConf.java
and some of its values and descriptions might be out of date or out of sync with the actual values and descriptions. However, as of Hive 0.14.0 the template file is generated directly from HiveConf.java
and therefore it is a reliable source for configuration variables and their defaults.
The administrative configuration variables are listed below. User User variables are listed in Hive Configuration Properties. As of Hive 0.14.0 you can display information about a configuration variable with the SHOW CONF command.
Temporary Folders
Hive uses temporary folders both on the machine running the Hive client and the default HDFS instance. These folders are used to store per-query temporary/intermediate data sets and are normally cleaned up by the hive client when the query is finished. However, in cases of abnormal hive client termination, some data may be left behind. The configuration details are as follows:
...