...
Using the set command in the CLI or Beeline for setting session level values for the configuration variable for all statements subsequent to the set command. For example, the following command sets the scratch directory (which is used by Hive to store temporary output and plans) to
/tmp/mydir
for all subsequent statements:No Format set hive.exec.scratchdir=/tmp/mydir;
Using the
--hiveconf
option of thehive
command (in the CLI) or the orbeeline
command for the entire session. 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 (see hive-site.xml and hive-default.xml.template below). For example:No Format <property> <name>hive.exec.scratchdir</name> <value>/tmp/mydir</value> <description>Scratch space for Hive jobs</description> </property>
- In server-specific configuration files (supported starting Hive 0.14). You can set metastore-specific configuration values in hivemetastore-site.xml, and HiveServer2-specific configuration values in hiveserver2-site.xml.
The server-specific configuration file is useful in two situations:
...