In this post, we will discuss about the procedure for upgrading Hive-0.13.1 to Hive-0.14.0 version with carry-forwarding the tables created in hive-0.13.1 version to hive-0.14.0 version without loosing any table.

Upgrading Hive-0.13.1 to Hive-0.14.0

In this we will upgrade Hive Service running with local metastore which will contain schema of all the tables created in hive-0.13.1 version. Here our main intention is to upgrade hive-0.13.1 to hive-0.14.0 to take the new features but keeping/carry forwarding the tables created by hive-0.13.1 to be accessed/available for hive-0.14.0 service.

Procedure

Download the apache-hive-0.14.0-bin.tar.gz file from apache download mirrors and extract into the same folder, where apache-hive-0.13.1-bin has been installed on the machine (usually into /usr/lib/hive on ubuntu machine).

Copy the MySQL Java Connector jar file from hive-0.13.1/lib directory into hive-0.14.0/lib directory to avoid the Error scenario 1 provided below at the bottom of this post.

Change the version number in the reference environment variable of HIVE_HOME in .bashrc file and refresh the terminal to pick the .bashrc changes.

Now we need to upgrade metastore schema version from 0.13.1 to 0.14.0 other wise we will run into Error Scenario 2 explained below. Please refer the solution 2 for upgrading metastore schema.

Once all the steps are done successfully, now we can start Hive CLI service or Metastore service without any messages and see all the tables created by previous version of Hive-0.13.1 as shown in below screen.

Below are some of the error messages that might occur while upgrading apache-hive-0.13.1-bin to apache-hive-0.14.0-bin. I have faced these. Finally resolved the error messages and successfully upgraded to Hive-0.14.0 version. So, Below are some of the error scenarios and their solutions for upgrading hive-0.13.1 to hive-0.14.0.

Solution 2

This error message is due to the mismatch of versions of hive metastore, Hive-0.14.0 requires the metastore schema version to be upgraded. This can be done in MySQL database as shown below.

Select the hive metastore database in MySQL and Run the upgrade script upgrade-0.13.0-to-0.14.0.mysql.sql. Before running this SQL script, change this to provide the actual path for SOURCE statement as shown in below.