Upgrade JDK1.7 to JDK1.8 in Cloudera CDH

Environment:

Cloudera CDH 5.12 on RHEL

Requirements

  • Install one of the CDH and Cloudera Manager Supported JDK Versions.
  • Install the same version of the Oracle JDK on each host.
  • Install the JDK in /usr/java/jdk-version
  • All nodes must run the same JDK version.
  • Cloudera only supports 64bit JDK from Oracle.

Upgrading to Oracle JDK 1.8 in a Cloudera Manager Deployment

  1. Upgrade to CM and CDH 5.3 or higher if you have not done so.
  2. Download the JDK1.8 from the Oracle website (this url may change over time):

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

After downloading check the package is not corrupted:

$ rpm -Kv jdk-8u162-linux-x64.rpm
jdk-8u162-linux-x64.rpm:
Header SHA1 digest: OK (4af05fafe672648d44985001270dbe05ccc7ec05)
MD5 digest: OK (d35444d1409ff121d20f31079fcc9f1f)

Copy the downloaded jdk file to a temporary directory in each host in the cluster.

3. Stop the Cloudera Management Service from Cloudera manager status page.

4. Stop all clusters from Cloudera manager status page.

5.Stop all Cloudera Manager Agents on all nodes.

/root>service cloudera-scm-agent stop

Stopping cloudera-scm-agent:                               [  OK  ]

6.Stop the Cloudera Manager Server on the nodes where CM server is deployed.

/root>service cloudera-scm-server stop

Stopping cloudera-scm-server:                              [  OK  ]

7.On the Cloudera Manager Server host and each cluster host:

  1. Install the same supported version of JDK 1.8 which was already downloaded above.

7.2 Go to the directory where you downloaded the jdk-8u162-linux-x64.rpm file and run the install command:

yum localinstall jdk-8u162-linux-x64.rpm

$ cd /usr/java

/usr/java>ll

total 12

lrwxrwxrwx 1 root root   16 Apr  4 17:35 default -> /usr/java/latest

drwxr-xr-x 9 root root 4096 Jun 29  2015 jdk1.6.0_31

drwxr-xr-x 8 root root 4096 Jun 29  2015 jdk1.7.0_67-cloudera

drwxr-xr-x 9 root root 4096 Apr  4 17:35 jdk1.8.0_162

lrwxrwxrwx 1 root root   22 Apr  4 17:35 latest -> /usr/java/jdk1.8.0_162

$ /usr/java>java -version
java version “1.8.0_162”
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

8. On the Cloudera Manager Server host, configure the location of the JDK in following files. Add this line if not there in the file:  /etc/default/cloudera-scm-server

export JAVA_HOME=/usr/java/latest

 

9. Start the Cloudera Manager Server

$ service cloudera-scm-server start
Starting cloudera-scm-server: [ OK ]
  1. Start all Cloudera Manager Agents in each node

$ service cloudera-scm-agent start

Starting cloudera-scm-agent: [ OK ]

11. Configure the location of the JDK on cluster hosts.
Navigate to Hosts -> Configuration -> Java Home Directory, and set it to jdk version such as  /usr/java/jdk1.8.0_162

[NOTE: If this field is left blank everything will start except streamsets service so we need to populate this field]

13. Start all clusters in Cloudera Manager. May need to restart some of the services in CMgr that dont come up first time.

14. Start the Cloudera Management Service.

This completes the JDK1.8 upgrade. You can verify in Cloudera Manager->Support->About the new jdk version:

Java VM Name: Java HotSpot(TM) 64-Bit Server VM

Java VM Vendor: Oracle Corporation

Java Version: 1.8.0_162

REFERENCES:

http://bigdatafan.blogspot.com/2016/05/upgrade-java-to-jdk-8-on-cloudera-cdh.html

https://www.cloudera.com/documentation/enterprise/5-12-x/topics/cdh_cm_upgrading_to_jdk8.html#concept_gby_lpv_hq

 

Advertisements

One thought on “Upgrade JDK1.7 to JDK1.8 in Cloudera CDH

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.