Apache Ambari Upgrade for IBM Power Systems
Also available as:

Prepare Hive for upgrade

Before upgrading the cluster to HDP 3.0.1 it’s required to prepare Hive for upgrade. The Hive pre-upgrade tool must be run to prepare the cluster.

Before you begin

  • The pre-upgrade tool supports a number of options, such as -dryrun option. The -dryrun option prints all the steps that the pre-upgrade tool executes. It is recommended that you examine the output of -dryrun to understand what changes might occur.

  • Run the command as the hive service user. The hive service user usually is the hive user. This is ‘hive’ by default, but if you don’t know which user is configured in your cluster go to the Ambari Web UI and click Cluster Admin > Service Accounts, and then look for “Hive User”.

  • In kerberized cluster, enter kinit before executing the command.

  • Ensure that the Hive Metastore is running. Connectivity between the tool and Hive MetaStore is mandatory.

  • Optionally, shut down HiveServer2. Shutting down HiveServer2 is recommended, but not required, to prevent operations on ACID tables while the tool executes.

  • The pre-upgrade tool might submit compaction jobs, so ensure that the cluster has sufficient capacity to execute those jobs.

To run the pre-upgrade tool:

  1. SSH into the host running the Hive Metastore. You can locate this host by going to the Ambari Web UI and clicking Hosts. Click on the Filter icon and type in “Hive Metastore: All” to find each host that has a Hive Metastore Instance installed on it. Download the pre-upgrade jar from the following location:

  2. Change directories to the /tmp directory.

    cd /tmp

  3. Execute the following command to download the pre-upgrade tool JAR:

    wget http://repo.hortonworks.com/content/repositories/releases/org/apache/hive/hive-pre-upgrade/

  4. Execute following command:

    export JAVA_HOME=[ path to your installed JDK ]

    $JAVA_HOME/bin/java -Djavax.security.auth.useSubjectCredsOnly=false -cp /usr/hdp/current/hive2/lib/derby-*:/usr/hdp/current/hadoop/etc/hadoop/:/tmp/hive-pre-upgrade- org.apache.hadoop.hive.upgrade.acid.PreUpgradeTool -execute

Register and Install Target Version