Performing a Rolling Upgrade to CDH 5.6
Minimum Required Role: Cluster Administrator (also provided by Full Administrator)
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.
This page described how to perform a rolling upgrade between maintenance and minor versions of CDH 5, except Beta versions. For rolling upgrade between CDH 4 versions, see Performing a Rolling Upgrade on a CDH 4 Cluster.
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.
The steps to perform a rolling upgrade of a cluster to CDH 5.6 are as follows:
Before You Begin
- Ensure Java 1.7 is installed across the cluster. For installation instructions and recommendations, see Upgrading to Oracle JDK 1.7 in a Cloudera Manager Deployment, and make sure you have read Known Issues and Workarounds in Cloudera Manager 5 before you proceed with the upgrade.
- 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 to re-enable Cloudera Manager alerts.
- Whenever upgrading Impala, whether in CDH or a standalone parcel or package, check your SQL against the newest reserved words listed in incompatible changes. If upgrading across multiple versions or in case of any problems, check against the full list of Impala keywords.
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 want. 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.
Back up HDFS Metadata
- CDH 5.0 or 5.1 to 5.2 or higher
- CDH 5.2 or 5.3 to 5.4 or higher
Back up HDFS metadata using the following command:
hdfs dfsadmin -fetchImage local directory
Run the Upgrade Wizard
- Log into the Cloudera Manager Admin console.
- From the tab, click next to the cluster name and select Upgrade Cluster. The Upgrade Wizard starts.
- If the option to pick between packages and parcels displays, select the Use Parcels option.
- In the Choose CDH Version (Parcels) field, select the CDH version. If there are no qualifying parcels, click the Modify the Remote Parcel Repository URLs link to go to the Parcel Configuration Settings page where you can add the locations of parcel repositories. Click Continue.
- Read the notices for steps you must complete before upgrading, click the Yes, I ... checkboxes after completing the steps, and click Continue.
- Cloudera Manager checks that hosts have the correct software installed. Click Continue.
- The selected parcels are downloaded and distributed. Click Continue.
- The Host Inspector runs and displays the CDH version on the hosts. Click Continue. The Choose Upgrade Procedure displays.
- Choose the type of upgrade and restart:
- Rolling Restart (Default) - Cloudera Manager upgrades services and performs a rolling restart.
- Choose the batch size (default 1) described in Performing a Cluster-Level Rolling Restart and click Advanced Options to specify additional rolling restart options. Services that do not support rolling restart undergo a normal restart, and are not available during the restart process.
- Click Continue. The Upgrade Cluster Command screen displays the result of the commands run by the wizard as it shuts down services, activates the new parcel, upgrades services as necessary, deploys client configuration files, restarts services, and performs a rolling restart of the services that support it.
- Full Cluster Restart - Cloudera Manager performs all service upgrades and restarts the cluster, during which services are not available.
- Click Continue. The Upgrade Cluster Command screen displays the result of the commands run by the wizard as it shuts down all services, activates the new parcel, upgrades services as necessary, deploys client configuration files, and restarts services.
- Click Continue. The wizard reports the result of the upgrade.
- Manual Upgrade - Cloudera Manager configures the cluster to the specified CDH version but performs no upgrades or service restarts. Manually doing the
upgrade is difficult and is for advanced users only.
- Click Continue. Cloudera Manager displays links to documentation describing the required upgrade steps.
- Rolling Restart (Default) - Cloudera Manager upgrades services and performs a rolling restart.
- Click Continue.
- Click Finish to return to the Home page.
Recover from Failed Steps
The actions performed by the upgrade wizard are listed in Upgrade Wizard Actions. If any of the steps in the Upgrade Cluster Command screen fails, complete the steps as described in that section before proceeding.Remove CDH 5 Packages
If your previous installation of CDH was done using packages, 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.
- If your Hue service uses the embedded SQLite DB, back up /var/lib/hue/desktop.db to a location that is not /var/lib/hue as this directory is removed when the packages are removed.
- 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 hbase-solr-doc avro-libs crunch-doc avro-doc solr-doc
SLES $ sudo zypper remove 'bigtop-*' hue-common impala-shell solr-server sqoop2-client hbase-solr-doc avro-libs crunch-doc avro-doc solr-doc
Ubuntu or Debian $ sudo apt-get purge 'bigtop-*' hue-common impala-shell solr-server sqoop2-client hbase-solr-doc avro-libs crunch-doc avro-doc solr-doc
- Not including Impala and Search
- 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
- If your Hue service uses the embedded SQLite DB, restore the DB you backed up:
- Stop the Hue service.
- Copy the backup from the temporary location to the newly created Hue database directory, /var/lib/hue.
- Start the Hue service.
Finalize HDFS Rolling Upgrade
- CDH 5.0 or 5.1 to 5.2 or higher
- CDH 5.2 or 5.3 to 5.4 or higher
- Deleting files does not free up disk space.
- Using the balancer causes all moved replicas to be duplicated.
- All on-disk data representing the NameNodes metadata is retained, which could more than double the amount of space required on the NameNode and JournalNode disks.
- Go to the HDFS service.
- Select Finalize Rolling Upgrade to confirm. and click
Upgrade Wizard Actions
Back up Metastore Databases
Back up the Hive, Sentry, and Sqoop metastore databases.- For each affected service:
- If not already stopped, stop the service.
- Back up the database. See Backing Up Databases.
Upgrade HDFS Metadata
- CDH 5.0 or 5.1 to 5.2 or higher
- CDH 5.2 or 5.3 to 5.4 or higher
- Start the ZooKeeper service.
- Go to the HDFS service.
- Select Upgrade HDFS Metadata to confirm. and click
Upgrade the Hive Metastore Database
- CDH 5.0 or 5.1 to 5.2 or higher
- CDH 5.3 to 5.4 or higher
- 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 Start to confirm. and click
- Select Install Oozie ShareLib to confirm. and click
Upgrade Sqoop
- Go to the Sqoop service.
- Select Stop to confirm. and click
- Select Upgrade Sqoop to confirm. and click
Upgrade the Sentry Database
- CDH 5.1 to 5.2 or higher
- CDH 5.2 to 5.3 or higher
- CDH 5.4 to 5.5 or higher
- Go to the Sentry service.
- Select Stop to confirm. and click
- Select Upgrade Sentry Database Tables to confirm. and click
Upgrade Spark
- Go to the Spark service.
- Select Stop to confirm. and click
- Select Install Spark JAR to confirm. and click
- Select Create Spark History Log Dir to confirm. and click
Start Cluster Services
- On the tab, click to the right of the cluster name and select Start.
- Click Start that appears in the next screen to confirm. The Command Details window shows the progress of starting services.
When All services successfully started appears, the task is complete and you can close the Command Details window.
Deploy Client Configuration Files
- On the Home page, click to the right of the cluster name and select Deploy Client Configuration.
- Click the Deploy Client Configuration button in the confirmation pop-up that appears.
<< Performing a Rolling Upgrade to CDH 5.7 | ©2016 Cloudera, Inc. All rights reserved | Performing a Rolling Upgrade to CDH 5.5 >> |
Terms and Conditions Privacy Policy |