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).

Note that the path for the default truststore for OpenJDK 8 is jre/lib/security/cacerts.
  • 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/cacerts to (OpenJDK 11) lib/security/cacerts
  • 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.

  1. Log in to each host and run the command for the version of the JDK you want to install:
    RHEL
    OpenJDK 8
    sudo yum install java-1.8.0-openjdk-devel
    OpenJDK 11
    su -c yum install java-11-openjdk-devel
    Ubuntu
    OpenJDK 8
    sudo apt-get install openjdk-8-jdk
    OpenJDK 11
    sudo apt-get install openjdk-11-jdk
  2. 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.