每日日报2021 11/8

今天我们继续学习Hive的基础操作:

修改 hive 的 log 存放日志到/opt/module/hive/logs
1)修改/opt/module/hive/conf/hive-log4j2.properties.template 文件名称为
hive-log4j2.properties
[atguigu@hadoop102 conf]$ pwd
/opt/module/hive/conf
[atguigu@hadoop102 conf]$ mv hive-log4j2.properties.template hive
log4j2.properties
2)在 hive-log4j2.properties 文件中修改 log 存放位置
hive.log.dir=/opt/module/hive/logs
2.9.2 打印 当前库 和 表头
在 hive-site.xml 中加入如下两个配置:
<property>
<name>hive.cli.print.header</name>
<value>true</value>
</property>
<property>
<name>hive.cli.print.current.db</name>
<value>true</value>
</property>
2.9.3 参数配置方式
1)查看当前所有的配置信息
hive>set;
2)参数的配置三种方式
1)配置文件方式
默认配置文件:hive-default.xml
用户自定义配置文件:hive-site.xml 

 

posted @ 2021-11-08 19:25  宋振兴  阅读(23)  评论(0编辑  收藏  举报