Post-Upgrade Steps for Hive
Complete the following steps after you upgrade Hive with or without the Installer.
About this task
Procedure
-
If you are using the Ranger Hive plugin, re-run the script
enable-hive-plugin.sh
. -
Migrate Hive Configuration.
Migrate any custom configuration settings into the Hive 2.3 version in the
/opt/mapr/hive/hive-2.3/conf/
directory. -
Update the Hive Metastore.
For upgrades from the old version of Hive to the new version, run the
schematool
command with the-upgradeSchema
option.NOTEIf you encounter any issues running theschematool
command, make sure you have finished all steps in Step 1: Restart and Check Cluster Services. In particular, ensure you have completed step 5:- On each node in the cluster, run
configure.sh
with the-R
option:# /opt/mapr/server/configure.sh -R -HS <hostname>
schematool
command.NOTEReview and, if necessary, perform the steps described in Troubleshooting Hive Upgrade Issues before running this command./opt/mapr/hive/hive-<version>/bin/schematool -dbType <metastore_database> -upgradeSchema
For example, for upgrades from Hive 2.1 to 2.3 on MySQL, run the following command:/opt/mapr/hive/hive-2.3/bin/schematool -dbType mysql -upgradeSchema
NOTEIf you encounter any issues related to running Hive on JDK 17, see Considerations for Hive on JDK 17. - On each node in the cluster, run
-
Run
configure.sh -R
.
This step enables Warden to recognize the newly installed services./opt/mapr/server/configure.sh -R
-
Verify that the metastore database update completed successfully. You can use
the following diagnostic tests:
- Run the
show tables
command in Hive and make sure it returns a complete list of all your Hive tables. - Perform simple SELECT operations on Hive tables that existed before the upgrade.
- Perform filtered SELECT operations on Hive tables that existed before the upgrade.
- Run the