Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HDP 2.6 hive metadata version conflict

Highlighted

HDP 2.6 hive metadata version conflict

New Contributor

Recently I'm trying HDP 2.6, but Hive version issue is making me crazy.

HDP 2.6 has two hive versions, hive 1.2 and 2.1. Most times hive 1.2 is the default, and after installation the metadata in DB is "1.2.0".

Then I restart hive metastore, ambari uses schematool in hive2 directory to verify schema version. Of course it fails.

If I try to use schematool in hive1 directory, it also fails, because hive1's metadata version is "1.2.1000".

What the hell should I do? Can I use hive2 as default?

5 REPLIES 5
Highlighted

Re: HDP 2.6 hive metadata version conflict

@Song Hou

HDP 2.6.1 has both Hive 1.2.1 and Hive 2.1.0 services, however both co-exist on the Hive metadata version of Hive 2.1.1.

mysql> use hive;
mysql> select * from VERSION;
+--------+----------------+-------------------------------+
| VER_ID | SCHEMA_VERSION | VERSION_COMMENT |
+--------+----------------+-------------------------------+
|1 | 2.1.1000 | Hive release version 2.1.1000 |
+--------+----------------+-------------------------------+

Check the version under MySQL hive database as above. If the version is not pointing to 2.1.x, then do the following:

1. Run /usr/hdp/2.6.x/hive2/bin/schematool -dbType mysql -upgradeSchema.

2. Make sure "select * from VERSION;" returns 2.1.x version.

3. Restart Hive services from Ambari.

To use Hive 1.2.1, use either Hive Cli or Hive view or JDBC connection string as jdbc:hive2://hostname:10000.

To use Hive 2.1, use Hive view 2.0 or JDBC connection string as jdbc:hive2://hostname:10500.

Highlighted

Re: HDP 2.6 hive metadata version conflict

New Contributor

@Sindhu

Thank you for the reply.

I cleaned the mysql and reinstall schema using hive2's schematool. Now the version number is 2.1.1000.

However, after I restart hive metastore service, the version number is changed to 1.2.0. Mysql select says as following:

mysql> select * from VERSION;
+--------+----------------+-------------------------------------+
| VER_ID | SCHEMA_VERSION | VERSION_COMMENT                     |
+--------+----------------+-------------------------------------+
|      1 | 1.2.0          | Set by MetaStore hive@10.100.67.202 |
+--------+----------------+-------------------------------------+
1 row in set (0.00 sec)

I think matastore's restart script somehow reinstalls the metadata in mysql.

What should I do?

Thanks again.

Highlighted

Re: HDP 2.6 hive metadata version conflict

@Song Hou

The Metastore that is modifying the database is on hive@10.100.67.202. Please verify the version of HDP on the machine and share the output hive --version on 10.100.67.202.

Highlighted

Re: HDP 2.6 hive metadata version conflict

Explorer

@Sindhu

what should the output of hive --version on the machine where metastore is installed? I have hdp 2.6.3 and hive --version returns

Hive 1.2.1000.2.6.3.0-235

thanks

Re: HDP 2.6 hive metadata version conflict

Contributor

seems like this issue got addressed in HDP 2.6.4 as I dind't see the above said scenario

Don't have an account?
Coming from Hortonworks? Activate your account here