hive常用属性设置

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


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值