Hive执行schematool -initSchema -dbType derby报错。
报错的日志:

doupeihua@doupeihua-2104 ~/software/hive/bin $ schematool -initSchema -dbType derbySLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/doupeihua/software/hive/lib/hive-jdbc-2.0.0-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/doupeihua/software/hive/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/doupeihua/software/spark-1.6.2-bin-hadoop2.6/lib/spark-assembly-1.6.2-hadoop2.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/doupeihua/software/hadoop-2.6.4/share/hadoop/common/lib/slf4j-log4j12-1.7.5.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:derby:;databaseName=metastore_db;create=true
Metastore Connection Driver :     org.apache.derby.jdbc.EmbeddedDriver
Metastore connection User:     APP
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 !!

解决办法(亲测有效)
1、先将metastore_db更名为:metastore_db.tmp

/hive/bin $mv metastore_db metastore_db.tmp  

2、执行schematool -initSchema -dbType derby

hive/bin $ schematool -initSchema -dbType derby

显示过程如下则证明问题解决:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/doupeihua/software/hive/lib/hive-jdbc-2.0.0-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/doupeihua/software/hive/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/doupeihua/software/spark-1.6.2-bin-hadoop2.6/lib/spark-assembly-1.6.2-hadoop2.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/doupeihua/software/hadoop-2.6.4/share/hadoop/common/lib/slf4j-log4j12-1.7.5.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:derby:;databaseName=metastore_db;create=true
Metastore Connection Driver :     org.apache.derby.jdbc.EmbeddedDriver
Metastore connection User:     APP
Starting metastore schema initialization to 2.0.0
Initialization script hive-schema-2.0.0.derby.sql
Initialization script completed
schemaTool completed

转自:https://blog.csdn.net/doupeihua/article/details/52496499

Hive报错:Error: FUNCTION 'NUCLEUS_ASCII' already exists. (state=X0Y68,code=30000)相关推荐

  1. hive 格式化:Error: Table ‘CTLGS‘ already exists (state=42S01,code=1050) Closing: 0: jdbc:mysql://hadoop

    hive 格式化schematool -initSchema -dbType mysql -verbose 出现:Error: Table 'CTLGS' already exists (state= ...

  2. hive安装 初始化报错Error: Duplicate key name ‘PCS_STATS_IDX‘ (state=42000,code=1061)

    错误日志 [root@mihaoyu151 conf]# schematool -dbType mysql -initSchema which: no hbase in (/usr/local/sbi ...

  3. hive3.1.2在进行初始化的时候出现Error: Table ‘CTLGS‘ already exists (state=42S01,code=1050)的错误提示。

    项目场景: hive3.1.2在进行初始化的时候出现Error: Table 'CTLGS' already exists (state=42S01,code=1050)的错误提2示. 问题描述 在h ...

  4. PostgreSQL报错 ERROR: function sum(character varying) does not exist

    1:SUM 函数只能用于数值类型的数据,例如整数.浮点数等.而你的代码中,可能将一个字符型的字段传递给了 SUM 函数,导致无法识别函数.因此,建议你检查一下代码中使用 SUM 函数的部分,看一下传递 ...

  5. Hive报错FAILED: Execution Error, return code 3 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask

    Hive报错Error while processing statement: FAILED: Execution Error, return code 3 from org.apache.hadoo ...

  6. #Hive报错 WritableStringObjectInspector cannot be cast to org.apache.hadoop.hive.serde2.objectinspect

    #Hive报错 FAILED: ClassCastException org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableS ...

  7. npm安装报错Error: EPERM: operation not permitted解决方案

    电脑重装系统后重新配置环境安装node后,npm命令安装报错 Error: EPERM: operation not permitted npm ERR! code EPERM npm ERR! sy ...

  8. hive初始化元数据的时候出现 Error:FUNCTION ‘NUCLEUS_ASCII‘ already exists解决方法

    hive初始化元数据的时候出现 Error:FUNCTION 'NUCLEUS_ASCII' already exists解决方法 执行 schematool --initSchema -dbType ...

  9. git:Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists)....

    Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). 解决办法一:保 ...

最新文章

  1. 简单了解request与response
  2. Mac 10.12为打开终端增加快捷键(转)
  3. 倒计时或按任意键返回首页_超实用excel小技巧之时间倒计时及动态显示
  4. 循环神经网络(RNN)相关知识
  5. 尝鲜!.NET5实操之docker+k8s,这10个坑,你不得不知!
  6. python 直方图每个bin中的值_【Python数据分析】四级成绩分布 -matplotlib,xlrd 应用...
  7. 2.3、getRunListeners().starting()
  8. mysql定时event创建每隔一天_mysql用event设置定时任务
  9. 【过拟合】防止模型过拟合的必备方法!
  10. pku1274 The Perfect Stall
  11. 电子电路设计的基础知识
  12. WARNING:tensorflow:sample_weight modes were coerced from ... to [‘...‘]
  13. 手机号码归属地查询 java_JAVA手机号码归属地查询
  14. TSP_旅行商问题 - 遗传算法(四)
  15. 如何阅读机器学习论文
  16. Cisco 2900xl/3500xl/2950/3550密码恢复流程
  17. 淘宝/天猫如何获取sku API接口,item_sku - 获取sku详细信息
  18. 深度优先搜索练习之神奇的矩环
  19. C语言例题——a+aa+aaa+..
  20. 其实,男人也需要被疼爱

热门文章

  1. 如何确定h.264的码率
  2. docker save 与 docker export 的区别
  3. jws 方式表格导出,excel文件导出,rest风格接口实现
  4. 解决报错:java.lang.NoSuchMethodException: com.tangyuan.entity.RicherProduct.<init>()
  5. ABAP WRITE
  6. FileStream功能被禁用
  7. 【BZOJ3590】[Snoi2013]Quare 状压DP
  8. CSS3 选择器 基本选择器介绍
  9. springside 4 web-init 启动
  10. GIL , 线程池 , 同步 , 异步 , 队列 , 事件