Hive 2.1.1 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.

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.


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


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

./bin/schematool -dbType derby -upgradeSchemaFrom 2.1.0

bests

Tags:

Mysql

Hadoop

Hive