MangoCool

Error: FUNCTION 'NUCLEUS_ASCII' already exists. (state=X0Y68,code=30000)

2016-04-20 11:39:16   作者:MangoCool   来源:MangoCool

安装好hive之后,直接运行启动:

$ ./hive

报错:

Logging initialized using configuration in jar:file:/home/hadoop/SW/hive-2.0.0/lib/hive-common-2.0.0.jar!/hive-log4j2.properties
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)
于是根据信息提示:hive metastore database is not initialized,大意就是hive需要初始化。提示可以使用schematool。

执行命令:

$ ./schematool -initSchema -dbType derby

继续报错:

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 ***

这个function的构建是数据库初始化的一部分,既然存在了,就直接去hive-schema-2.0.0-derby.sql里面注释好了。

问题就这么解决了!欢迎交流!

标签: hive error

分享:

上一篇User: hadoop is not allowed to impersonate anonymous

下一篇Error: Cannot find configuration directory: /etc/hadoop

关于我

崇尚极简,热爱技术,喜欢唱歌,热衷旅行,爱好电子产品的一介码农。

座右铭

当你的才华还撑不起你的野心的时候,你就应该静下心来学习,永不止步!

人生之旅历途甚长,所争决不在一年半月,万不可因此着急失望,招精神之萎葸。

Copyright 2015- 芒果酷(mangocool.com) All rights reserved. 湘ICP备14019394号

免责声明:本网站部分文章转载其他媒体,意在为公众提供免费服务。如有信息侵犯了您的权益,可与本网站联系,本网站将尽快予以撤除。