1、.hiverc
该文件作为一个隐藏文件,位于 $HIVE_HOME/bin/ 目录下
Hive在启动之前会先执行 .hiverc文件,一些常用的配置参数可以写到这里,比如一些常用的UDF及优先尝试本地模式等。
set hive.exec.mode.local.auto=true;
一些常用的可以写在 .hiverc文件的内容
#让hive尽量尝试local模式查询而不是mapred方式
set hive.exec.mode.local.auto=true;
#在命令行中显示当前数据库名
set hive.cli.print.current.db=true;
#查询出来的结果显示列的名称
set hive