一. 问题描述
image.png如上图所示,控制台登陆hive,出现很多提示信息。
[root@hp5 metadata]# hive
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/hadoop-3.3.2/share/hadoop/common/lib/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/flink-1.15.2/lib/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
which: no hbase in (/home/miniconda3/condabin:/root/perl5/bin:/usr/lib/jvm/java11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/home/spark-3.2.2-bin-hadoop3.2/bin:/home/spark-3.2.2-bin-hadoop3.2/sbin:/home/hadoop-3.3.2/bin:/home/hadoop-3.3.2/sbin:/home/apache-hive-3.1.3-bin/bin:/home/flink-1.15.2/bin:/home/apache-maven-3.6.3/bin:/root/bin:/usr/local/python3/bin:/usr/local/redis/bin)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/hadoop-3.3.2/share/hadoop/common/lib/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/apache-hive-3.1.3-bin/lib/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/flink-1.15.2/lib/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
2022-11-11 10:18:27,576 INFO [main] conf.HiveConf (HiveConf.java:findConfigFile(187)) - Found configuration file file:/home/apache-hive-3.1.3-bin/conf/hive-site.xml
2022-11-11 10:18:28,878 WARN [main] common.LogUtils (LogUtils.java:logConfigLocation(187)) - DEPRECATED: Ignoring hive-default.xml found on the CLASSPATH at /home/apache-hive-3.1.3-bin/conf/hive-default.xml
Hive Session ID = 554bc58c-b823-4a37-88f1-784f99798d1c
2022-11-11 10:18:28,928 INFO [main] SessionState (SessionState.java:printInfo(1227)) - Hive Session ID = 554bc58c-b823-4a37-88f1-784f99798d1c
Logging initialized using configuration in jar:file:/home/apache-hive-3.1.3-bin/lib/hive-common-3.1.3.jar!/hive-log4j2.properties Async: true
2022-11-11 10:18:29,015 INFO [main] SessionState (SessionState.java:printInfo(1227)) -
Logging initialized using configuration in jar:file:/home/apache-hive-3.1.3-bin/lib/hive-common-3.1.3.jar!/hive-log4j2.properties Async: true
2022-11-11 10:18:30,218 INFO [main] session.SessionState (SessionState.java:createPath(790)) - Created HDFS directory: /tmp/hive/root/554bc58c-b823-4a37-88f1-784f99798d1c
2022-11-11 10:18:30,243 INFO [main] session.SessionState (SessionState.java:createPath(790)) - Created local directory: /tmp/root/554bc58c-b823-4a37-88f1-784f99798d1c
2022-11-11 10:18:30,247 INFO [main] session.SessionState (SessionState.java:createPath(790)) - Created HDFS directory: /tmp/hive/root/554bc58c-b823-4a37-88f1-784f99798d1c/_tmp_space.db
2022-11-11 10:18:30,264 INFO [main] conf.HiveConf (HiveConf.java:getLogIdVar(5043)) - Using the default value passed in for log id: 554bc58c-b823-4a37-88f1-784f99798d1c
2022-11-11 10:18:30,264 INFO [main] session.SessionState (SessionState.java:updateThreadName(441)) - Updating thread name to 554bc58c-b823-4a37-88f1-784f99798d1c main
2022-11-11 10:18:31,176 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] metastore.HiveMetaStore (HiveMetaStore.java:newRawStoreForConf(719)) - 0: Opening raw store with implementation class:org.apache.hadoop.hive.metastore.ObjectStore
2022-11-11 10:18:31,207 WARN [554bc58c-b823-4a37-88f1-784f99798d1c main] metastore.ObjectStore (ObjectStore.java:correctAutoStartMechanism(639)) - datanucleus.autoStartMechanismMode is set to unsupported value null . Setting it to value: ignored
2022-11-11 10:18:31,218 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] metastore.ObjectStore (ObjectStore.java:initializeHelper(482)) - ObjectStore, initialize called
2022-11-11 10:18:31,218 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] conf.MetastoreConf (MetastoreConf.java:findConfigFile(1240)) - Found configuration file file:/home/apache-hive-3.1.3-bin/conf/hive-site.xml
2022-11-11 10:18:31,219 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] conf.MetastoreConf (MetastoreConf.java:findConfigFile(1233)) - Unable to find config file hivemetastore-site.xml
2022-11-11 10:18:31,220 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] conf.MetastoreConf (MetastoreConf.java:findConfigFile(1240)) - Found configuration file null
2022-11-11 10:18:31,221 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] conf.MetastoreConf (MetastoreConf.java:findConfigFile(1233)) - Unable to find config file metastore-site.xml
2022-11-11 10:18:31,223 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] conf.MetastoreConf (MetastoreConf.java:findConfigFile(1240)) - Found configuration file null
2022-11-11 10:18:31,418 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] DataNucleus.Persistence (Log4JLogger.java:info(77)) - Property datanucleus.cache.level2 unknown - will be ignored
2022-11-11 10:18:31,617 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] hikari.HikariDataSource (HikariDataSource.java:<init>(71)) - HikariPool-1 - Starting...
2022-11-11 10:18:31,828 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] hikari.HikariDataSource (HikariDataSource.java:<init>(73)) - HikariPool-1 - Start completed.
2022-11-11 10:18:31,886 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] hikari.HikariDataSource (HikariDataSource.java:<init>(71)) - HikariPool-2 - Starting...
2022-11-11 10:18:31,893 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] hikari.HikariDataSource (HikariDataSource.java:<init>(73)) - HikariPool-2 - Start completed.
2022-11-11 10:18:31,944 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] metastore.ObjectStore (ObjectStore.java:getPMF(671)) - Setting MetaStore object pin classes with hive.metastore.cache.pinobjtypes="Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Order"
2022-11-11 10:18:32,053 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] metastore.MetaStoreDirectSql (MetaStoreDirectSql.java:<init>(186)) - Using direct SQL, underlying DB is MYSQL
2022-11-11 10:18:32,054 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] metastore.ObjectStore (ObjectStore.java:setConf(397)) - Initialized ObjectStore
2022-11-11 10:18:32,237 WARN [554bc58c-b823-4a37-88f1-784f99798d1c main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
2022-11-11 10:18:32,238 WARN [554bc58c-b823-4a37-88f1-784f99798d1c main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
2022-11-11 10:18:32,239 WARN [554bc58c-b823-4a37-88f1-784f99798d1c main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
2022-11-11 10:18:32,239 WARN [554bc58c-b823-4a37-88f1-784f99798d1c main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
2022-11-11 10:18:32,239 WARN [554bc58c-b823-4a37-88f1-784f99798d1c main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
2022-11-11 10:18:32,240 WARN [554bc58c-b823-4a37-88f1-784f99798d1c main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
2022-11-11 10:18:33,896 WARN [554bc58c-b823-4a37-88f1-784f99798d1c main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
2022-11-11 10:18:33,897 WARN [554bc58c-b823-4a37-88f1-784f99798d1c main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
2022-11-11 10:18:33,897 WARN [554bc58c-b823-4a37-88f1-784f99798d1c main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
2022-11-11 10:18:33,898 WARN [554bc58c-b823-4a37-88f1-784f99798d1c main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
2022-11-11 10:18:33,898 WARN [554bc58c-b823-4a37-88f1-784f99798d1c main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
2022-11-11 10:18:33,899 WARN [554bc58c-b823-4a37-88f1-784f99798d1c main] DataNucleus.MetaData (Log4JLogger.java:warn(96)) - Metadata has jdbc-type of null yet this is not valid. Ignored
2022-11-11 10:18:36,206 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] metastore.HiveMetaStore (HiveMetaStore.java:createDefaultRoles_core(814)) - Added admin role in metastore
2022-11-11 10:18:36,210 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] metastore.HiveMetaStore (HiveMetaStore.java:createDefaultRoles_core(823)) - Added public role in metastore
2022-11-11 10:18:36,239 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] metastore.HiveMetaStore (HiveMetaStore.java:addAdminUsers_core(863)) - No user is added in admin role, since config is empty
2022-11-11 10:18:36,375 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] metastore.RetryingMetaStoreClient (RetryingMetaStoreClient.java:<init>(97)) - RetryingMetaStoreClient proxy=class org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient ugi=root (auth:SIMPLE) retries=1 delay=1 lifetime=0
2022-11-11 10:18:36,407 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] metastore.HiveMetaStore (HiveMetaStore.java:logInfo(897)) - 0: get_all_functions
2022-11-11 10:18:36,409 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(349)) - ugi=root ip=unknown-ip-addr cmd=get_all_functions
Hive Session ID = d80f6106-e0f5-429d-a5cc-d3e8d512d1a2
2022-11-11 10:18:36,460 INFO [pool-10-thread-1] SessionState (SessionState.java:printInfo(1227)) - Hive Session ID = d80f6106-e0f5-429d-a5cc-d3e8d512d1a2
Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
2022-11-11 10:18:36,460 INFO [554bc58c-b823-4a37-88f1-784f99798d1c main] CliDriver (SessionState.java:printInfo(1227)) - Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
2022-11-11 10:18:36,471 INFO [pool-10-thread-1] session.SessionState (SessionState.java:createPath(790)) - Created HDFS directory: /tmp/hive/root/d80f6106-e0f5-429d-a5cc-d3e8d512d1a2
2022-11-11 10:18:36,472 INFO [pool-10-thread-1] session.SessionState (SessionState.java:createPath(790)) - Created local directory: /tmp/root/d80f6106-e0f5-429d-a5cc-d3e8d512d1a2
2022-11-11 10:18:36,475 INFO [pool-10-thread-1] session.SessionState (SessionState.java:createPath(790)) - Created HDFS directory: /tmp/hive/root/d80f6106-e0f5-429d-a5cc-d3e8d512d1a2/_tmp_space.db
2022-11-11 10:18:36,476 INFO [pool-10-thread-1] metastore.HiveMetaStore (HiveMetaStore.java:logInfo(897)) - 1: get_databases: @hive#
2022-11-11 10:18:36,476 INFO [pool-10-thread-1] HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(349)) - ugi=root ip=unknown-ip-addr cmd=get_databases: @hive#
2022-11-11 10:18:36,478 INFO [pool-10-thread-1] metastore.HiveMetaStore (HiveMetaStore.java:newRawStoreForConf(719)) - 1: Opening raw store with implementation class:org.apache.hadoop.hive.metastore.ObjectStore
2022-11-11 10:18:36,480 INFO [pool-10-thread-1] metastore.ObjectStore (ObjectStore.java:initializeHelper(482)) - ObjectStore, initialize called
2022-11-11 10:18:36,496 INFO [pool-10-thread-1] metastore.MetaStoreDirectSql (MetaStoreDirectSql.java:<init>(186)) - Using direct SQL, underlying DB is MYSQL
2022-11-11 10:18:36,496 INFO [pool-10-thread-1] metastore.ObjectStore (ObjectStore.java:setConf(397)) - Initialized ObjectStore
2022-11-11 10:18:36,503 INFO [pool-10-thread-1] metastore.HiveMetaStore (HiveMetaStore.java:logInfo(897)) - 1: get_tables_by_type: db=@hive#default pat=.*,type=MATERIALIZED_VIEW
2022-11-11 10:18:36,503 INFO [pool-10-thread-1] HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(349)) - ugi=root ip=unknown-ip-addr cmd=get_tables_by_type: db=@hive#default pat=.*,type=MATERIALIZED_VIEW
2022-11-11 10:18:36,509 INFO [pool-10-thread-1] metastore.HiveMetaStore (HiveMetaStore.java:logInfo(897)) - 1: get_multi_table : db=default tbls=
2022-11-11 10:18:36,509 INFO [pool-10-thread-1] HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(349)) - ugi=root ip=unknown-ip-addr cmd=get_multi_table : db=default tbls=
2022-11-11 10:18:36,512 INFO [pool-10-thread-1] metastore.HiveMetaStore (HiveMetaStore.java:logInfo(897)) - 1: get_tables_by_type: db=@hive#test pat=.*,type=MATERIALIZED_VIEW
2022-11-11 10:18:36,512 INFO [pool-10-thread-1] HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(349)) - ugi=root ip=unknown-ip-addr cmd=get_tables_by_type: db=@hive#test pat=.*,type=MATERIALIZED_VIEW
2022-11-11 10:18:36,516 INFO [pool-10-thread-1] metastore.HiveMetaStore (HiveMetaStore.java:logInfo(897)) - 1: get_multi_table : db=test tbls=
2022-11-11 10:18:36,516 INFO [pool-10-thread-1] HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(349)) - ugi=root ip=unknown-ip-addr cmd=get_multi_table : db=test tbls=
2022-11-11 10:18:36,516 INFO [pool-10-thread-1] metadata.HiveMaterializedViewsRegistry (HiveMaterializedViewsRegistry.java:run(171)) - Materialized views registry has been initialized
hive>
二. 解决方案
hadoop的配置文件hadoop-env.sh中加上
exportHADOOP_CLASSPATH=$HIVE_HOME/conf:$HADOOP_CLASSPATH
网友评论