Starting Apache Hive
Also available as:
PDF

Run a Hive command

You can run most Hive commands that push configuration variables to Hive SQL scripts from the command line of a node in your cluster. The hive keyword, which launches Beeline in the background, precedes the command.

Hive 3 supports only Beeline for running Hive commands from the command line. In the task below, you start Beeline in the background and enter the -e flag followed by a Hive set command that lists system variables.

The following components are running:
  • HiveServer
  • Hive clients
  • You have a network connection to Beeline.
On the command line of a a node in your cluster, enter the hive command to send configuration properties to standard output.
> hive -e set
The list of supported commands appear. All obsolete Hive CLI commands are supported on the Beeline command line except set key=value commands that configure Hive metastore.
The output includes the system variable settings:
+----------------------------------------------------------------+
|                            set                                 |
+----------------------------------------------------------------+
| _hive.hdfs.session.path=/tmp/hive/hive/91ecb...00a             |
| _hive.local.session.path=/tmp/hive/91ecb...00a                 |
| _hive.tmp_table_space=/tmp/hive/hive/91ecb...00a/_tmp_space.db |
| ambari.hive.db.schema.name=hive                                |
| atlas.hook.hive.maxThreads=1                                   |
 ...