Post-Upgrade Steps for Hive

Complete the following steps after you upgrade Hive with or without the Installer.

About this task

Procedure

  1. If you are using the Ranger Hive plugin, re-run the script enable-hive-plugin.sh.
  2. Migrate Hive Configuration.
    Migrate any custom configuration settings into the Hive 2.3 version in the /opt/mapr/hive/hive-2.3/conf/ directory.
  3. Update the Hive Metastore.
    For upgrades from the old version of Hive to the new version, run the schematool command with the -upgradeSchema option.
    NOTE If you encounter any issues running the schematool 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>
    Afterward, re-run the schematool command.
    NOTE Review 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
  4. Run configure.sh -R.
    /opt/mapr/server/configure.sh -R
    This step enables Warden to recognize the newly installed services.
  5. 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.