This is the documentation for Cloudera 5.2.x.
Documentation for other versions is available at Cloudera Documentation.

Performing a Rolling Upgrade on a Cluster

Required Role:

  Important: This feature is available only with a Cloudera Enterprise license.
For other licenses, the following applies:
  • Cloudera Express - the feature is not available.
  • Cloudera Enterprise Data Hub Edition Trial - the feature will not be available after you end the trial or the trial license expires.
To obtain a license for Cloudera Enterprise, please fill in this form or call 866-843-7207. After you install a Cloudera Enterprise license, the feature will be available.

The rolling upgrade feature takes advantage of parcels and the HDFS high availability to enable you to upgrade your cluster software and restart the upgraded services without taking the entire cluster down. You must have HDFS high availability enabled to perform a rolling upgrade.

You can perform a rolling upgrade between minor versions of CDH 4, or between minor versions of CDH 5, except Beta versions. It is not possible to perform a rolling upgrade from CDH 4 to CDH 5 because of incompatibilities between the two major versions. Instead, follow the instructions for a full upgrade at Upgrading from CDH 4 to CDH 5 Parcels.

A rolling upgrade involves two steps:
  1. Download, distribute, and activate the parcel for the new software you want to install.
  2. Perform a rolling restart to restart the services in your cluster. You can do a rolling restart of individual services, or if you have high availability enabled, you can perform a restart of the entire cluster. Cloudera Manager will manually fail over your NameNode at the appropriate point in the process so that your cluster will not be without a functional NameNode.
To avoid lots of alerts during the upgrade process, you can enable maintenance mode on your cluster before you start the upgrade. This will stop email alerts and SNMP traps from being sent, but will not stop checks and configuration validations from being made. Be sure to exit maintenance mode when you have finished the upgrade in order to re-enable Cloudera Manager alerts.

The steps to perform a rolling upgrade of a cluster are as follows:

  1. Ensure High Availability is Enabled
  2. Download, Distribute, and Activate Parcels
  3. Upgrade the Hive Metastore Database
  4. Upgrade the Oozie ShareLib
  5. Upgrade Sqoop
  6. Upgrade Sentry Database
  7. Upgrade Spark
  8. Restart the Cluster
  9. Remove CDH Packages
  10. Restore Hue Database
  11. Finalize HDFS Rolling Upgrade (CDH 5.2 and later only)

Ensure High Availability is Enabled

To enable high availability, see HDFS High Availability for instructions. You do not need to enable automatic failover for rolling restart to work, though you can enable it if you wish. Automatic failover does not affect the rolling restart operation. If you have JobTracker high availability configured, Cloudera Manager will fail over the JobTracker during the rolling restart, but this is not a requirement for performing a rolling upgrade.

Download, Distribute, and Activate Parcels

  1. In the Cloudera Manager Admin Console, click the Parcels indicator in the top navigation bar ( or ) to go to the Parcels page.
  2. In the parcels page, click Download for the version(s) you want to download. If the parcel you want is not shown here — for example, you want to upgrade to version of CDH that is not the most current version — you can make additional parcel repos available through the parcel settings page. If your Cloudera Manager server does not have Internet access, you can obtain the required parcel file(s) and put them into the local repository. See Creating and Using a Parcel Repository for more details.
  3. When the download has completed, click Distribute for the version you downloaded.
  4. When the parcel has been distributed and unpacked, the button will change to say Activate.
  5. Click Activate. You are asked if you want to restart the cluster. Do not restart the cluster at this time.
  6. Click Close.

Upgrade the Hive Metastore Database

Required if you are upgrading from an earlier version of CDH 4 to CDH 4.2 or later or from an earlier version of CDH 5 to CDH 5.2 or later.
  1. Make a backup copy of your Hive metastore database.
  2. Go to the Hive service.
  3. Select Actions > Stop and click Stop to confirm.
  4. Select Actions > Upgrade Hive Metastore Database Schema and click Upgrade Hive Metastore Database Schema to confirm.
  5. If you have multiple instances of Hive, perform the upgrade on each metastore database.

Upgrade the Oozie ShareLib

  1. Go to the Oozie service.
  2. Select Actions > Stop and click Stop to confirm.
  3. Select Actions > Install Oozie ShareLib and click Install Oozie ShareLib to confirm.

Upgrade Sqoop

  1. Go to the Sqoop service.
  2. Select Actions > Stop and click Stop to confirm.
  3. Select Actions > Upgrade Sqoop and click Upgrade Sqoop to confirm.

Upgrade Sentry Database

Required if you are updating from CDH 5.0 to 5.1 or later.

  1. Back up the Sentry database.
  2. Go to the Sentry service.
  3. Select Actions > Stop and click Stop to confirm.
  4. Select Actions > Upgrade Sentry Database Tables and click Upgrade Sentry Database Tables to confirm.

Upgrade Spark

Required if you are updating from CDH 5.0 to 5.1 or later.

  1. Go to the Spark service.
  2. Select Actions > Stop and click Stop to confirm.
  3. Select Actions > Upload Spark Jar and click Upload Spark Jar to confirm.
  4. Select Actions > Create Spark History Log Dir and click Create Spark History Log Dir to confirm.

Restart the Cluster

  1. On the Home page, click to the right of the cluster name and click Rolling Restart to proceed with a rolling restart. Rolling restart is available only if high availability is enabled. Click Restart to perform a normal restart. Services that do not support rolling restart will undergo a normal restart, and will not be available during the restart process.
  2. For a rolling restart, a pop-up allows you to chose which services you want to restart, and presents caveats to be aware of for those services that can undergo a rolling restart.
      Note: If you have just upgraded your Cloudera Manager deployment to 4.6, and are now doing a rolling upgrade of your cluster, you must ensure that MapReduce is restarted before the rest of your services, or the restart may fail. This is necessary to ensure the MapReduce configuration changes are propagated.

    Further, if you are upgrading from CDH 4.1 with Impala to CDH 4.2 or 4.3, you must restart MapReduce before Impala restarts (by default Impala is restarted before MapReduce).

    The workaround is to perform a restart of MapReduce alone as the first step, then perform a cluster restart of the remaining services.

  3. Click Confirm to start the rolling restart.

Remove CDH Packages

If your previous installation of CDH was done using packages, you must remove those packages on all hosts on which you installed the parcels and refresh the symlinks so that clients will run the new software versions. Skip this step if your previous installation was using parcels.

  • CDH 5 -
    1. Uninstall the CDH packages on each host:
      • Not including Impala and Search
        Operating System Command
        RHEL
        $ sudo yum remove bigtop-utils bigtop-jsvc bigtop-tomcat hue-common sqoop2-client
        SLES
        $ sudo zypper remove bigtop-utils bigtop-jsvc bigtop-tomcat hue-common sqoop2-client
        Ubuntu or Debian
        $ sudo apt-get purge bigtop-utils bigtop-jsvc bigtop-tomcat hue-common sqoop2-client
      • Including Impala and Search
        Operating System Command
        RHEL
        $ sudo yum remove 'bigtop-*' hue-common impala-shell solr-server sqoop2-client
        SLES
        $ sudo zypper remove 'bigtop-*' hue-common impala-shell solr-server sqoop2-client
        Ubuntu or Debian
        $ sudo apt-get purge 'bigtop-*' hue-common impala-shell solr-server sqoop2-client
    2. Restart all the Cloudera Manager Agents to force an update of the symlinks to point to the newly installed components on each host:
      $ sudo service cloudera-scm-agent restart
  • CDH 4 -
    1. If Hue is configured to use SQLite as its database:
      1. Stop the Hue service.
      2. Back up the desktop.db to a temporary location before deleting the old Hue Common package. The location of the database can be found in the Hue service Configuration tab under Service > Database > Hue's Database Directory.
        Important: Removing the Hue Common package will remove your Hue database; if you do not back it up you may lose all your Hue user account information.
    2. Uninstall the CDH packages on each host:
      • Not including Impala and Search
        Operating System Command
        RHEL
        $ sudo yum remove hadoop hue-common bigtop-jsvc bigtop-tomcat
        SLES
        $ sudo zypper remove hadoop hue-common bigtop-jsvc bigtop-tomcat
        Ubuntu or Debian
        $ sudo apt-get purge hadoop hue-common bigtop-jsvc bigtop-tomcat
      • Including Impala and Search
        Operating System Command
        RHEL
        $ sudo yum remove hadoop hue-common impala-shell solr-server 'bigtop-*'
        SLES
        $ sudo zypper remove hadoop hue-common impala-shell solr-server 'bigtop-*'
        Ubuntu or Debian
        $ sudo apt-get purge hadoop hue-common impala-shell solr-server 'bigtop-*'
    3. Restart all the Cloudera Manager Agents to force an update of the symlinks to point to the newly installed components on each host:
      $ sudo service cloudera-scm-agent restart

Restore Hue Database

If you removed CDH 4 packages, restore the Hue database back up.
  1. Go to the Hue service.
  2. Select Actions > Stop and click Stop to confirm.
  3. Copy the backup from the temporary location to the newly created Hue database directory: /opt/cloudera/parcels/CDH-4.x.0-x.cdh4.x.0.p0.xx/share/hue/desktop.
  4. Restart the Hue service.

Finalize HDFS Rolling Upgrade (CDH 5.2 and later only)

If you are performing a rolling upgrade to CDH 5.2, you must finalize the rolling upgrade in HDFS:
  1. Go to the HDFS service.
  2. Select Actions > Finalize Rolling Upgrade and click Finalize Rolling Upgrade to confirm.