Manually Installing OpenJDK
Before installing Cloudera Manager and Runtime, perform the steps in this section to install OpenJDK on all hosts in your cluster(s).
- The package names used when installing the OpenJDK 11 and OpenJDK 8 are different and are noted in the steps below.
- The path for the default truststore has changed from (OpenJDK 8)
jre/lib/security/cacertsto (OpenJDK 11)
- See the following blog post for general information about migrating to Java 11: All You Need to Know For Migrating To Java 11.
You must install a supported version of OpenJDK. If your deployment uses a version of OpenJDK lower than 1.8.0_181, see TLS Protocol Error with OpenJDK.
Log in to each host and run the command for the version of the JDK you want to
sudo yum install java-1.8.0-openjdk-devel
su -c yum install java-11-openjdk-devel
sudo apt-get install openjdk-8-jdk
sudo apt-get install openjdk-11-jdk
- Tune the JDK (OpenJDK 11 only.)
OpenJDK 11 uses new defaults for garbage collection and other Java options specified when launching Java processes. Due to these changes you may need to tune the garbage collection by adjusting the Java options used to run cluster services, which are configured separately for each service using the service's configuration parameters. To locate the correct parameter, log in to the Cloudera Manager Admin Console, go to the cluster and service you want to configure and search for "Java Configuration Options".
When using OpenJDK 11, Cloudera Manager and most Cloudera Runtime services use G1GC as the default method of garbage collection. Java 8 used "ConcurrentMarkSweep" (CMS) for garbage collection. When using G1GC, the pauses for garbage collection are shorter, so components will usually be more responsive, but they are more sensitive to JVMs with overcommitted memory usage. See Tuning JVM Garbage Collection.