Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to upgrade hive from 0.12.0 to 1.2.1

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail how to upgrade hive from 0.12.0 to 1.2.1. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Detailed description of hive upgrade steps (hive-0.12.0 to hive-1.2.1)

Upgrade steps:

1. Close all current processes related to hive

two。 Back up the hive database of MySQL

Mysqldump-uroot-proot hive > schem_hive-0.12.0.sql

It is convenient to roll back after the upgrade fails.

3. Modify the environment variable HIVE_HOME

4. Extract the installation package of 1.2.1

Enter the directory: hive-1.2.1/scripts/metastore/upgrade/mysql/

Here is the script:

Upgrade-0.12.0-to-0.13.0.mysql.sql

Upgrade-0.13.0-to-0.14.0.mysql.sql

Upgrade-0.14.0-to-1.1.0.mysql.sql

Upgrade-1.1.0-to-1.2.0.mysql.sql

Execute the script:

Mysql-uroot-proot hive schem_hive-0.13.0.sql

Do the following in turn:

Mysql-uroot-proot hive schem_hive-0.14.0.sql

Mysql-uroot-proot hive schem_hive-1.1.0.sql

Mysql-uroot-proot hive schem_hive-1.2.0.sql

Report an error ERROR 1005 (HY000) at line 4 in file: '019 HIVEMI 7784.mysql.sqlcards: Can't create table' hive.PART_COL_STATS' (errno: 150)

Check the PART_COL_STATS creation table sql. The error is due to the lack of foreign keys in PART_COL_STATS due to the unsuccessful creation of the PARTITIONS table in hive-schema-0.13.0.mysql.sql. You can create the PARTITIONS table manually.

5. Copy the previous version of the mysql connector jar package to the current hive lib directory, and put the hive-site.xml,hive-env.xml and hive-log4j.properties configured in the previous version back to the current hive conf.

This is the end of the article on "how to upgrade hive from 0.12.0 to 1.2.1". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report