0


解决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

本文转载自: https://blog.csdn.net/m0_64893323/article/details/134103758
版权归原作者 D(自律版) 所有, 如有侵权,请联系我们删除。

“解决hive客户端输入命令出现大量日志问题”的评论:

还没有评论