Aleks Ya
Aleks Ya

Reputation: 909

Which hive-site.xml is used by Hive's CLI

A test server contains a lot of hive-site.xml files.

I run Hive's CLI by hive command.

How to identify which hive-site.xml file is used by that Hive's CLI?

HIVE_CONF_DIR environment variable is not set.

Upvotes: 1

Views: 481

Answers (1)

David דודו Markovitz
David דודו Markovitz

Reputation: 44941

Execute this

hive --hiveconf hive.root.logger=DEBUG,console -e '' 2>&1 | grep hive-site.xml

Demo

bash-4.1$ hive --hiveconf hive.root.logger=DEBUG,console -e '' 2>&1 | grep hive-site.xml
17/05/29 07:45:38 [main]: DEBUG common.LogUtils: Using hive-site.xml found on CLASSPATH at /etc/hive/conf.dist/hive-site.xml
bash-4.1$ 

Upvotes: 2

Related Questions