美文网首页
org.apache.hadoop.hive.metastore

org.apache.hadoop.hive.metastore

作者: 随时学丫 | 来源:发表于2019-02-11 17:43 被阅读1次

Hive 启动遇到 metastore 未初始化错误

Exception in thread "main" java.lang.RuntimeException: Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql)

按照提示运行:

schematool -initSchema -dbType derby

接着出现如下错误:

Starting metastore schema initialization to 2.0.0

Initialization script hive-schema-2.0.0.derby.sql
Error: FUNCTION 'NUCLEUS_ASCII' already exists. (state=X0Y68,code=30000)
org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !!
*** schemaTool failed ***

发现 hive/bin 目录下已存在 metastore_db 的文件夹,删除后初始化成功

rm -rf metastore_db

相关文章

网友评论

      本文标题:org.apache.hadoop.hive.metastore

      本文链接:https://www.haomeiwen.com/subject/gooqeqtx.html