hive启动报错-Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

来源:互联网 发布:it读音 编辑:程序博客网 时间:2024/06/06 01:12

Exceptionin thread "main" java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient


问题找到了,原来Hive2需要hive元数据库初始化

schematool -dbType mysql -initSchema

[root@node1 ~]# schematool --helpwhich: no hbase in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/app/jdk1.7.0_79/bin:/opt/app/zookeeper-3.4.9/bin:/opt/app/hadoop-2.7.3/bin:/opt/app/hadoop-2.7.3/sbin:/opt/app/hive-2.1.1/bin:/root/bin)SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/opt/app/hive-2.1.1/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Found binding in [jar:file:/opt/app/hadoop-2.7.3/share/hadoop/common/lib/slf4j-log4j12-1.7.10.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.apache.logging.slf4j.Log4jLoggerFactory]usage: schemaTool -dbOpts <databaseOpts>             Backend DB specific options -dbType <databaseType>             Metastore database type -dryRun                            list SQL scripts (no execute) -help                              print this message -info                              Show config and schema details -initSchema                        Schema initialization -initSchemaTo <initTo>             Schema initialization to a version -passWord <password>               Override config file password -upgradeSchema                     Schema upgrade -upgradeSchemaFrom <upgradeFrom>   Schema upgrade from a version -userName <user>                   Override config file user name -verbose                           only print SQL statements[root@node1 ~]# schematool -dbType mysql -initSchemawhich: no hbase in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/app/jdk1.7.0_79/bin:/opt/app/zookeeper-3.4.9/bin:/opt/app/hadoop-2.7.3/bin:/opt/app/hadoop-2.7.3/sbin:/opt/app/hive-2.1.1/bin:/root/bin)SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/opt/app/hive-2.1.1/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Found binding in [jar:file:/opt/app/hadoop-2.7.3/share/hadoop/common/lib/slf4j-log4j12-1.7.10.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.apache.logging.slf4j.Log4jLoggerFactory]Metastore connection URL:    jdbc:mysql://node1:3306/hive?createDatabaseIfNotExist=trueMetastore Connection Driver :    com.mysql.jdbc.DriverMetastore connection User:   rootStarting metastore schema initialization to 2.1.0Initialization script hive-schema-2.1.0.mysql.sqlInitialization script completedschemaTool completed

元数据库初始化完成后,就可以进入hive了

[root@node1 ~]# hivewhich: no hbase in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/app/jdk1.7.0_79/bin:/opt/app/zookeeper-3.4.9/bin:/opt/app/hadoop-2.7.3/bin:/opt/app/hadoop-2.7.3/sbin:/opt/app/hive-2.1.1/bin:/root/bin)SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/opt/app/hive-2.1.1/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Found binding in [jar:file:/opt/app/hadoop-2.7.3/share/hadoop/common/lib/slf4j-log4j12-1.7.10.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.apache.logging.slf4j.Log4jLoggerFactory]Logging initialized using configuration in jar:file:/opt/app/hive-2.1.1/lib/hive-common-2.1.1.jar!/hive-log4j2.properties Async: trueHive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. tez, spark) or using Hive 1.X releases.hive> 

阅读全文
0 0
原创粉丝点击