java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

后端 未结 12 1372
无人共我
无人共我 2020-11-27 14:38

I have Hadoop 2.7.1 and apache-hive-1.2.1 versions installed on ubuntu 14.0.

  1. Why this error is occurring ?
  2. Is any metastore installation required?
12条回答
  •  爱一瞬间的悲伤
    2020-11-27 14:41

    mybe your hive metastore are inconsistent! I'm in this scene.

    first. I run

     $ schematool -dbType mysql -initSchema  
    

    then I found this

    > Error: Duplicate key name 'PCS_STATS_IDX' (state=42000,code=1061) org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !!

    then I run

     $ schematool -dbType mysql -info
    

    found this error

    Hive distribution version: 2.3.0 Metastore schema version: 1.2.0 org.apache.hadoop.hive.metastore.HiveMetaException: Metastore schema version is not compatible. Hive Version: 2.3.0, Database Schema Version: 1.2.0


    so i format my hive metastore, then it's done! * drop mysql database, the database named hive_db * run schematool -dbType mysql -initSchema for initialize metadata

提交回复
热议问题