Upgrading to CDH 5.4 Using Packages
Minimum Required Role: Cluster Administrator (also provided by Full Administrator)
If you originally used Cloudera Manager to install CDH 5 using packages, you can upgrade to CDH 5.4 using either packages or parcels. Using parcels is recommended, because the upgrade wizard for parcels handles the upgrade almost completely automatically.
The following procedure requires cluster downtime. If you use parcels, have a Cloudera Enterprise license, and have enabled HDFS high availability, you can perform a rolling upgrade that lets you avoid cluster downtime.
To upgrade CDH using packages, the steps are as follows.
- Before You Begin
- Upgrade Unmanaged Components
- Stop Cluster Services
- Back up the HDFS Metadata on the NameNode
- Back up Metastore Databases
- Upgrade Managed Components
- Update Symlinks for the Newly Installed Components
- Run the Upgrade Wizard
- Perform Manual Upgrade or Recover from Failed Steps
- Finalize the HDFS Metadata Upgrade
- Upgrade Wizard Actions
Before You Begin
- Read the CDH 5 Release Notes.
- Read the Cloudera Manager 5 Release Notes.
- Ensure Java 1.7 or 1.8 is installed across the cluster. For installation instructions and recommendations, see Upgrading to Oracle JDK 1.7 in a Cloudera Manager Deployment or Upgrading to Oracle JDK 1.8, and make sure you have read Known Issues and Workarounds in Cloudera Manager 5 before you proceed with the upgrade.
- Ensure that the Cloudera Manager minor version is equal to or greater than
the CDH minor version. For example:
Target CDH Version Minimum Cloudera Manager Version 5.0.5 5.0.x 5.1.4 5.1.x 5.4.1 5.4.x - Date partition columns: as of Hive version 13, implemented in CDH
5.2, Hive validates the format of dates in partition columns, if they are stored as dates. A partition column with a date in invalid form can neither be used nor dropped
once you upgrade to CDH 5.2 or higher. To avoid this problem, do one of the following:
- Fix any invalid dates before you upgrade. Hive expects dates in partition columns to be in the form YYYY-MM-DD.
- Store dates in partition columns as strings or integers.
SELECT "DBS"."NAME", "TBLS"."TBL_NAME", "PARTITION_KEY_VALS"."PART_KEY_VAL" FROM "PARTITION_KEY_VALS" INNER JOIN "PARTITIONS" ON "PARTITION_KEY_VALS"."PART_ID" = "PARTITIONS"."PART_ID" INNER JOIN "PARTITION_KEYS" ON "PARTITION_KEYS"."TBL_ID" = "PARTITIONS"."TBL_ID" INNER JOIN "TBLS" ON "TBLS"."TBL_ID" = "PARTITIONS"."TBL_ID" INNER JOIN "DBS" ON "DBS"."DB_ID" = "TBLS"."DB_ID" AND "PARTITION_KEYS"."INTEGER_IDX" ="PARTITION_KEY_VALS"."INTEGER_IDX" AND "PARTITION_KEYS"."PKEY_TYPE" = 'date';
- 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.
- Run the Host Inspector and fix every issue.
- If using security, run the The Security Inspector.
- Run hdfs fsck / and hdfs dfsadmin -report and fix every issue.
- Run hbase hbck.
- Review the upgrade procedure and reserve a maintenance window with enough time allotted to perform all steps. For production clusters, Cloudera recommends allocating up to a full day maintenance window to perform the upgrade, depending on the number of hosts, the amount of experience you have with Hadoop and Linux, and the particular hardware you are using.
- 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.
- Hue validates CA certificates and needs a truststore. To create one, follow the instructions in Hue as a TLS/SSL Client.
Upgrade Unmanaged Components
- Mahout
- Pig
- Whirr
For information on upgrading these unmanaged components, see Upgrading Mahout, Upgrading Pig, and Upgrading Whirr.
Stop Cluster Services
- On the tab, click to the right of the cluster name and select Stop.
- Click Stop in the confirmation screen. The Command Details window shows the progress of stopping services.
When All services successfully stopped appears, the task is complete and you can close the Command Details window.
Back up the HDFS Metadata on the NameNode
- CDH 5.0 or 5.1 to 5.2 or higher
- CDH 5.2 or 5.3 to 5.4 or higher
- Go to the HDFS service.
- Click the Configuration tab.
- In the Search field, search for "NameNode Data Directories" and note the value.
- On the active NameNode host, back up the directory listed in the NameNode Data Directories
property. If more than one is listed, make a backup of one directory, since each directory is a complete copy. For example, if the NameNode data directory is /data/dfs/nn, do the following as root:
# cd /data/dfs/nn # tar -cvf /root/nn_backup_data.tar .
You should see output like this:
./ ./current/ ./current/fsimage ./current/fstime ./current/VERSION ./current/edits ./image/ ./image/fsimage
If there is a file with the extension lock in the NameNode data directory, the NameNode most likely is still running. Repeat the steps, starting by shutting down the NameNode role.
Back up Metastore Databases
Back up the Hive and Sqoop metastore databases.- For each affected service:
- If not already stopped, stop the service.
- Back up the database. See Backing Up Databases.
Upgrade Managed Components
Use one of the following strategies to upgrade CDH 5:- Use the Cloudera "1-click Install" package. This is the simplest way to upgrade only the Cloudera
packages.
- Check whether you have the CDH 5 "1-click" repository installed.
- Red Hat/CentOS-compatible and SLES
rpm -q CDH 5-repository
If you are upgrading from CDH 5 Beta 1 or higher, and you used the "1-click" package for the previous CDH 5 release, you should see:
CDH5-repository-1-0
In this case, skip to installing the CDH 5 packages. If instead you see:
package CDH 5-repository is not installed
proceed with installing the 1-click package.
- Ubuntu and Debian
dpkg -l | grep CDH 5-repository
If the repository is installed, skip to installing the CDH 5 packages; otherwise proceed with installing the "1-click" package.
- Red Hat/CentOS-compatible and SLES
- If the CDH 5 "1-click" repository is not already installed on each host in the cluster, follow the
instructions below for that host's operating system.
- Red Hat compatible
- Download and install the "1-click Install" package.
- Download the CDH 5 "1-click Install" package (or RPM).
Click the appropriate RPM and Save File to a directory with write access (for example, your home directory).
OS Version Link to CDH 5 RPM RHEL/CentOS/Oracle 5 RHEL/CentOS/Oracle 5 link RHEL/CentOS/Oracle 6 RHEL/CentOS/Oracle 6 link RHEL/CentOS/Oracle 7 RHEL/CentOS/Oracle 7 link - Install the RPM for all RHEL versions:
$ sudo yum --nogpgcheck localinstall cloudera-cdh-5-0.x86_64.rpm
- Download the CDH 5 "1-click Install" package (or RPM).
- (Optionally) add a repository key:
- Red Hat/CentOS/Oracle 5
$ sudo rpm --import http://archive.cloudera.com/cdh5/redhat/5/x86_64/cdh/RPM-GPG-KEY-cloudera
- Red Hat/CentOS/Oracle 6
$ sudo rpm --import http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/RPM-GPG-KEY-cloudera
- Red Hat/CentOS/Oracle 5
- Download and install the "1-click Install" package.
- SLES
- Download and install the "1-click Install" package:
- Download the CDH 5 "1-click Install" package.
Download the rpm file, choose Save File, and save it to a directory to which you have write access (for example, your home directory).
- Install the RPM:
$ sudo rpm -i cloudera-cdh-5-0.x86_64.rpm
- Update your system package index by running:
$ sudo zypper refresh
- Download the CDH 5 "1-click Install" package.
- (Optionally) add a repository key:
$ sudo rpm --import http://archive.cloudera.com/cdh5/sles/11/x86_64/cdh/RPM-GPG-KEY-cloudera
- Download and install the "1-click Install" package:
- Ubuntu and Debian
- Download and install the "1-click Install" package:
- Download the CDH 5 "1-click Install" package:
OS Version Package Link Jessie Jessie package Wheezy Wheezy package Precise Precise package Trusty Trusty package - Install the package by doing one of the following:
- Choose Open with in the download window to use the package manager.
- Choose Save File, save the package to a directory to which you have write access (for example, your home directory), and install it from the command line.
For example:
sudo dpkg -i cdh5-repository_1.0_all.deb
- Download the CDH 5 "1-click Install" package:
- (Optionally) add a repository key:
- Ubuntu Trusty
$ curl -s http://archive.cloudera.com/cdh5/ubuntu/trusty/amd64/cdh/archive.key | sudo apt-key add -
- Ubuntu Precise
$ curl -s http://archive.cloudera.com/cdh5/ubuntu/precise/amd64/cdh/archive.key | sudo apt-key add -
- Debian Wheezy
$ curl -s http://archive.cloudera.com/cdh5/debian/wheezy/amd64/cdh/archive.key | sudo apt-key add -
- Ubuntu Trusty
- Download and install the "1-click Install" package:
- Red Hat compatible
- Install the CDH packages:
- Red Hat compatible
$ sudo yum clean all $ sudo yum install avro-tools crunch flume-ng hadoop-hdfs-fuse hadoop-httpfs hadoop-kms hbase hbase-solr hive-hbase hive-webhcat hue-beeswax hue-hbase hue-impala hue-pig hue-plugins hue-rdbms hue-search hue-spark hue-sqoop hue-zookeeper impala impala-shell kite llama mahout oozie parquet pig pig-udf-datafu search sentry solr solr-mapreduce spark-python sqoop sqoop2 whirr zookeeper
- SLES
$ sudo zypper clean --all $ sudo zypper install avro-tools crunch flume-ng hadoop-hdfs-fuse hadoop-httpfs hadoop-kms hbase hbase-solr hive-hbase hive-webhcat hue-beeswax hue-hbase hue-impala hue-pig hue-plugins hue-rdbms hue-search hue-spark hue-sqoop hue-zookeeper impala impala-shell kite llama mahout oozie parquet pig pig-udf-datafu search sentry solr solr-mapreduce spark-python sqoop sqoop2 whirr zookeeper
- Ubuntu and Debian
$ sudo apt-get update $ sudo apt-get install avro-tools crunch flume-ng hadoop-hdfs-fuse hadoop-httpfs hadoop-kms hbase hbase-solr hive-hbase hive-webhcat hue-beeswax hue-hbase hue-impala hue-pig hue-plugins hue-rdbms hue-search hue-spark hue-sqoop hue-zookeeper impala impala-shell kite llama mahout oozie parquet pig pig-udf-datafu search sentry solr solr-mapreduce spark-python sqoop sqoop2 whirr zookeeper
Note: Installing these packages will also install all the other CDH packages that are needed for a full CDH 5 installation. - Red Hat compatible
- Check whether you have the CDH 5 "1-click" repository installed.
- Use your operating system's package management tools to update all packages to the latest version
using standard repositories. This approach works well because it minimizes the amount of configuration required and uses the simplest commands. Be aware that this can take a considerable amount of
time if you have not upgraded the system recently. To update all packages on your system, use the following command:
Operating System Command RHEL $ sudo yum update
SLES $ sudo zypper up
Ubuntu or Debian $ sudo apt-get upgrade
Update Symlinks for the Newly Installed Components
$ sudo service cloudera-scm-agent restart
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.
- In the Choose Method field, select the Use Packages option.
- In the Choose CDH Version (Packages) field, specify the CDH version of the packages you have installed on your cluster. 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. If the packages have not been installed, a warning displays to that effect. Install the packages and click Check Again. When there are no errors, click Continue.
- The Host Inspector runs and displays the CDH version on the hosts. Click Continue.
- Choose the type of upgrade and restart:
- Cloudera Manager upgrade - Cloudera Manager performs all service upgrades and restarts the cluster.
- Click Continue. The Command
Progress 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. If any of the steps fails or you click the Abort button the Retry button at the top right is
enabled.
You can click Retry to retry the step and continue the wizard or click the Cloudera Manager logo to return to the tab and manually perform the failed step and all following steps. - Click Continue. The wizard reports the result of the upgrade.
- Click Continue. The Command
Progress 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. If any of the steps fails or you click the Abort button the Retry button at the top right is
enabled.
- Manual upgrade - Select the Let me upgrade the cluster checkbox. 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.
- Cloudera Manager upgrade - Cloudera Manager performs all service upgrades and restarts the cluster.
- Click Finish to return to the Home page.
Perform Manual Upgrade or Recover from Failed Steps
The actions performed by the upgrade wizard are listed in Upgrade Wizard Actions. If you chose manual upgrade or any of the steps in the Command Progress screen fails, complete the steps as described in that section before proceeding.Finalize the HDFS Metadata 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.
- Click the Instances tab.
- Click the NameNode instance.
- Select and click Finalize Metadata Upgrade to confirm.
Upgrade Wizard Actions
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.
<< Upgrading to CDH 5.4 Using Parcels | ©2016 Cloudera, Inc. All rights reserved | Upgrading to CDH 5.3 >> |
Terms and Conditions Privacy Policy |