Performing a Rolling Upgrade on a Cluster
- Cloudera Express - The feature is not available.
- Cloudera Enterprise Data Hub Edition Trial - The feature is available until you end the trial or the trial license expires.
Cloudera Manager's rolling upgrade feature takes advantage of parcels and the HDFS High Availability configuration 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, as they become available. 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.
- Download, distribute, and activate the parcel for the new software you want to install.
- 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.
The steps to perform a rolling upgrade of a cluster are as follows.
- Ensure High Availability is Enabled
- Download, Distribute, and Activate Parcels
- Upgrade the Hive Metastore Database
- Upgrade the Oozie ShareLib
- Upgrade Sqoop
- Restart the Cluster
- Remove CDH Packages
- Update Symlinks for the Newly Installed Components
- Restore Hue Database
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
- In the Cloudera Manager Admin Console, click the Parcels indicator in the top navigation bar ( or ) to go to the Parcels page.
- 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.
- CDH 4 - If you want to run both CDH, Cloudera Impala, and Cloudera Search you should download the CDH, Impala, and Solr parcels. You can find the locations of the previous CDH 4 parcels at http://archive.cloudera.com/cdh4/parcels/. If you are upgrading to CDH 4.3 and want to use Sentry, you can find the separate Sentry parcel at http://archive.cloudera.com/sentry/parcels/latest/). Sentry is included with CDH 4.4 or later parcels.
- CDH 5 - Download the CDH parcel.
- When the download has completed, click Distribute for the version you downloaded.
- When the parcel has been distributed and unpacked, the button will change to say Activate. If you are doing a major version upgrade (that is, from CDH 4 to CDH 5 using parcels), after the distribution phase the button will be labeled Upgrade rather than Activate. In this case, follow the instructions at Upgrading from CDH 4 to CDH 5 Parcels.
- Click Activate. You are asked if you want to restart the cluster. Do not restart the cluster at this time.
- 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.
- Make a backup copy of your Hive metastore database.
- Go to the Hive service.
- Select Stop to confirm. and click
- Select Upgrade Hive Metastore Database Schema to confirm. and click
- If you have multiple instances of Hive, perform the upgrade on each metastore database.
Upgrade the Oozie ShareLib
- Go to the Oozie service.
- Select Stop to confirm. and click
- Select Install Oozie ShareLib to confirm. and click
- When the command completes, click Close.
Upgrade Sqoop
- Go to the Sqoop service.
- Select Stop to confirm. and click
- Select Upgrade Sqoop to confirm. and click
- When the command completes, click Close.
Restart the Cluster
- 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.
- 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.
- 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 you installed the previous version of CDH 5 using parcels.
- CDH 5 -
- 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
- Not including Impala and Search
- Uninstall the CDH packages on each host:
- CDH 4 -
- If Hue is configured to use SQLite as its database:
- Stop the Hue service.
- 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. - 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-*'
- Not including Impala
and Search
- If Hue is configured to use SQLite as its database:
Update Symlinks for the Newly Installed Components
$ sudo service cloudera-scm-agent restart
Restore Hue Database
If you removed CDH 4 packages, restore the Hue database from the backup.- In the Cloudera Manager Admin Console, select the Hue service.
- Select Stop to confirm. and click
- Copy the backup to the newly created Hue database directory: /opt/cloudera/parcels/CDH-4.x.0-x.cdh4.x.0.p0.xx/share/hue/desktop.
- Restart the Hue service.
<< Configuring the CDH Version for a Cluster | Upgrading CDH 5 >> | |