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

前端 未结 5 2321
既然无缘
既然无缘 2020-12-08 16:43

I\'m running Hadoop 2.7.3, MySQL 5.7.17 and Hive 2.1.1 on Ubuntu 16.04.

When I run ./hive, I keep getting the following warning and exception:

SLF4J:         


        
相关标签:
5条回答
  • 2020-12-08 16:48

    I have faced the similar issue. The issue can be solved by initializing Metastore Schema using below command for Mysql

    schematool --dbType mysql --initSchema

    this command can be used for any Metastore => replace dbType "mysql" with the "Metastrore used for hive"

    for more info--> https://cwiki.apache.org/confluence/display/Hive/Hive+Schema+Tool

    0 讨论(0)
  • 2020-12-08 16:58

    I faced similar issue when i was setting up HIVE 2.3.1 for the first time. I am using postgres database as a metastore.

    Then i had to set the below property to false.

      <property>
        <name>hive.metastore.schema.verification</name>
        <value>false</value>
        <description>
          Enforce metastore schema version consistency.
          True: Verify that version information stored in is compatible with one from Hive jars.  Also disable automatic
                schema migration attempt. Users are required to manually migrate schema after Hive upgrade which ensures
                proper metastore schema migration. (Default)
          False: Warn if the version information stored in metastore doesn't match with one from in Hive jars.
        </description>
      </property>
    
    0 讨论(0)
  • 2020-12-08 17:03

    fllow belows ,that will make sence

    I have faced the similar issue. The issue can be solved by initializing Metastore Schema using below command for MySQL

    schematool --dbType mysql --initSchema
    

    this command can be used for any Metastore => replace dbType "mysql" with the "Metastrore used for hive"

    for more info--> https://cwiki.apache.org/confluence/display/Hive/Hive+Schema+Tool

    0 讨论(0)
  • 2020-12-08 17:04

    there is a tool provided by hive to upgrade hive database :

    ./bin/schematool -dbType derby -upgradeSchemaFrom 2.1.0
    

    bests

    0 讨论(0)
  • 2020-12-08 17:06

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

    The schema files for MySQL will be available under the path $HIVE_HOME/scripts/metastore/upgrade/mysql/.

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

    Restart Hive metastore.

    0 讨论(0)
提交回复
热议问题