zoukankan      html  css  js  c++  java
  • 数据分析——Hive数据库初始化失败Error: FUNCTION 'NUCLEUS_ASCII' already exists.

    进入Hive交互系统,“show databases:”。出现报错:

    Failed to start database 'metastore_db' with class loader sun.misc.Launcher$AppClassLoader

    经查找是因为数据库初始化的问题。

    进入终端初始化数据库

    [hadoop@master apache-hive-3.1.1-bin]$ ./bin/schematool -dbType derby -initSchema

    报错:

    Metastore Connection Driver :     org.apache.derby.jdbc.EmbeddedDriver
    Metastore connection User:     APP
    Starting metastore schema initialization to 3.1.0
    Initialization script hive-schema-3.1.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 !!
    Underlying cause: java.io.IOException : Schema script failed, errorcode 2
    Use --verbose for detailed stacktrace.
    *** schemaTool failed ***

    解决:删除apache-hive-3.1.1-bin文件夹下的metastore_db文件

    [hadoop@master apache-hive-3.1.1-bin]$ rm -rf metastore_db

    重新初始化数据库,进入hive交互模式show databases;成功。

  • 相关阅读:
    友盟消息推送api、python sdk问题、测试demo代码
    Django的时区设置问题
    优酷视频上传api及demo代码
    git回滚线上代码
    charles的使用
    django+ajax用FileResponse文件下载到浏览器过程中遇到的问题
    scrapy框架
    几个简单的算法
    SQLAlchemy
    redis
  • 原文地址:https://www.cnblogs.com/LCharles/p/11360494.html
Copyright © 2011-2022 走看看