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

后端 未结 12 1373
无人共我
无人共我 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:49

    In my case when i tried

    $ hive --service metastore 
    

    I got

    MetaException(message:Version information not found in metastore. )

    The necessary tables required for the metastore are missing in MySQL. Manually create the tables and restart hive metastore.

    cd $HIVE_HOME/scripts/metastore/upgrade/mysql/ 
    
    < Login into MySQL > 
    
    mysql> drop database IF EXISTS ; 
    mysql> create database ; 
    mysql> use ; 
    mysql> source hive-schema-2.x.x.mysql.sql; 
    

    metastore db name should match the database name mentioned in hive-site.xml files connection property tag.

    hive-schema-2.x.x.mysql.sql file depends on the version available in the current directory. Try to go for the latest because it holds many old schema files also.

    Now try to execute hive --service metastore If everything goes cool, then simply start the hive from terminal.

    >hive
    

    I hope the above answer serves your need.

提交回复
热议问题