2017-05-29 81 views
1

測試服務器包含大量hive-site.xml文件。Hive的CLI使用哪個hive-site.xml

我使用hive命令運行Hive的CLI。

如何識別Hive的CLI使用哪個hive-site.xml文件?

HIVE_CONF_DIR環境變量未設置。

回答

1

執行此

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

演示

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$