Pre-Upgrade Steps for Hive
Complete the following steps before you upgrade Hive with or without the Installer.
About this task
Upgrades from Hive 2.x to 3.x require some additional pre-upgrade
steps. If you are upgrading from Hive 2.x to 3.x, review and complete the
pre-upgrade activities in the following topics before completing the steps on this
page:
For this task, you need to back up the metastore database in case an error occurs during the Hive upgrade. You also need to back up configuration files if you made configuration changes that you want to carry over to the next version.
Procedure
-
Back up the metastore database.
mysqldump -u<user> -p<passwd> <metastore_db_name> -r metastore-db-dump.sql
-
Copy the configuration files in
/opt/mapr/hive/hive-<version>/conf/
to a location outside the installation directory.After upgrading, you can reapply changes to the updated Hive installation using the backup. -
Stop Hive services.
maprcli node services -name hivemeta -action stop -nodes <list of hive nodes> maprcli node services -name hs2 -action stop -nodes <list of hive nodes> maprcli node services -name hcat -action stop -nodes <list of hive nodes>
Preserving the Hive Configuration
Starting from EEP-6.0.0, preserving of user configuration logic is built into Hive.
Procedure
-
For a minor version update (for example,
Hive-2.1-1803
toHive-2.1-1808
), user configuration from a previous version is copied to a folder with an old version timestamp and is also copied to a new versionconf
folder. -
For a major version update (for example,
Hive-2.1-1803
toHive-2.3-1808
), user configuration from a previous version is only copied to a folder with an old version timestamp.
Starting from EEP-5.0.2 and EEP-6.0.1, a logic of preserving user Warden files configuration for Hive Metastore, HiveServer2 and WebHCat are built into Hive.
Procedure
-
For a minor version update (for example,
Hive-2.1-1808
toHive-2.1-1901
), user configuration of Warden files from a previous version is copied to a folder with an old version timestamp and is also preserved in theMAPR_HOME/conf/conf.d/
folder. -
For a major version update (for example,
Hive-2.1-1808
toHive-2.3-1901
), user configuration from a previous version is only copied to a folder with an old version timestamp.