hive常用属性设置
1、Hive数据仓库位置配置 (配置文件为/conf/hive-site.xml )
hive表中的数据,存储在hdfs上的位置
默认值:/user/hive/warehouse
<property>
<name>hive.metastore.warehouse.dir</name>
<value>/user/hive/warehouse</value>
</property>
2、Hive运行日志信息位置
默认在:/tmp/root/hive.log (root表示当前用户)
[root@cloud1 bin]# cd /tmp/root/
[root@cloud1 root]# ll
total 396
-rw-r--r-- 1 root root 0 Oct 18 05:47 72e72704-16f2-40a6-be89-7bcf974aedd75830019940900046534.pipeout
-rw-r--r-- 1 root root 223570 Oct 18 05:47 hive.log
-rw-r--r-- 1 root root 175360 Oct 17 23:50 hive.log.2015-10-17
可以修改hive日志输出路径 配置文件为:/conf/hive-site.xml
指定hive运行时显示的log日志的级别
$HIVE_HOME/conf/hive-log4j.properties
hive.root.logger=INFO,DRFA
hive.log.dir=/opt/modules/hive-0.13.1/logs
hive.log.file=hive-self.log
3、在cli命令行上显示当前数据库,以及查询表的行头信息
$HIVR_HOME/conf/hive-site.xml
<property>
<name>hive.cli.print.header</name>
<value>false</value>
<description>Whether to print the names of the columns in query output.</description>
</property>
<property>
<name>hive.cli.print.current.db</name>
<value>false</value>
<description>Whether to include the current database in the Hive prompt.</description>
</property>
4、查看当前所有的配置信息
hive>set -v;
cli.CliDriver
system:sun.java.launcher=SUN_STANDARD
system:sun.jnu.encoding=UTF-8
system:sun.management.compiler=HotSpot 64-Bit Tiered Compilers
system:sun.os.patch.level=unknown
system:user.country=US
system:user.dir=/opt/hive-0.13.1/bin
system:user.home=/root
system:user.language=en
system:user.name=root
system:user.timezone=US/Pacific-New