解决hive客户端输入命令出现大量日志问题

问题描述:

which: no hbase in (/bin:/usr/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/module/hadoop/bin:/opt/module/hadoop/sbin:/opt/module/jdk/bin:/opt/module/kafka/bin:/opt/module/flink/bin:/opt/module/hive/bin:/opt/module/spark/bin:/usr/local/mysql/bin:/home/yangyu/.local/bin:/home/yangyu/bin)
Hive Session ID = 75f2520c-7ccc-4595-ad92-08701f892a97

Logging initialized using configuration in file:/opt/module/hive/conf/hive-log4j2.properties Async: true
0    [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  org.apache.hadoop.hive.metastore.ObjectStore  - datanucleus.autoStartMechanismMode is set to unsupported value null . Setting it to value: ignored
834  [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  DataNucleus.MetaData  - Metadata has jdbc-type of null yet this is not valid. Ignored
835  [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  DataNucleus.MetaData  - Metadata has jdbc-type of null yet this is not valid. Ignored
835  [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  DataNucleus.MetaData  - Metadata has jdbc-type of null yet this is not valid. Ignored
835  [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  DataNucleus.MetaData  - Metadata has jdbc-type of null yet this is not valid. Ignored
836  [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  DataNucleus.MetaData  - Metadata has jdbc-type of null yet this is not valid. Ignored
836  [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  DataNucleus.MetaData  - Metadata has jdbc-type of null yet this is not valid. Ignored
2068 [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  DataNucleus.MetaData  - Metadata has jdbc-type of null yet this is not valid. Ignored
2069 [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  DataNucleus.MetaData  - Metadata has jdbc-type of null yet this is not valid. Ignored
2069 [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  DataNucleus.MetaData  - Metadata has jdbc-type of null yet this is not valid. Ignored
2069 [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  DataNucleus.MetaData  - Metadata has jdbc-type of null yet this is not valid. Ignored
2069 [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  DataNucleus.MetaData  - Metadata has jdbc-type of null yet this is not valid. Ignored
2069 [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  DataNucleus.MetaData  - Metadata has jdbc-type of null yet this is not valid. Ignored
Hive Session ID = 4170f5c9-c8a8-45c5-9f52-ce81b5528fed
hive (default)> show databases;
OK
database_name
default
Time taken: 0.882 seconds, Fetched: 1 row(s)
hive (default)> show tables;
OK
tab_name
student
Time taken: 0.029 seconds, Fetched: 1 row(s)
hive (default)> insert into table student values(1,'abc');
32171 [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  org.apache.hadoop.hive.ql.session.SessionState  - METASTORE_FILTER_HOOK will be ignored, since hive.security.authorization.manager is set to instance of HiveAuthorizerFactory.
32175 [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  org.apache.hadoop.hive.metastore.ObjectStore  - datanucleus.autoStartMechanismMode is set to unsupported value null . Setting it to value: ignored
32186 [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  org.apache.hadoop.hive.metastore.ObjectStore  - datanucleus.autoStartMechanismMode is set to unsupported value null . Setting it to value: ignored
34016 [75f2520c-7ccc-4595-ad92-08701f892a97 main] WARN  org.apache.hadoop.hive.metastore.ObjectStore  - datanucleus.autoStartMechanismMode is set to unsupported value null . Setting it to value: ignored
Query ID = yangyu_20231029153317_92219919-a6ea-40b5-be5a-e928c8ff50a8
Total jobs = 1
Launching Job 1 out of 1

解决办法:只让终端提示错误信息

在hive的conf目录下新建log4j.properties文件传入一下内容

log4j.rootLogger=WARN, CA
log4j.appender.CA=org.apache.log4j.ConsoleAppender
log4j.appender.CA.layout=org.apache.log4j.PatternLayout
log4j.appender.CA.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

D(自律版)

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值