当前位置:首页 » Apache技术知识

org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization FAILED! Metastore state wo

2016-05-23 18:06 本站整理 浏览(355)

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)

按照提示运行:

[code]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 ***

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