Apache Ambari Administration
Also available as:
PDF
loading table of contents...

Chapter 14. Change the JDK Version

During your initial Ambari Server Setup, you select the JDK to use or provide a path to a custom JDK already installed on your hosts. After setting up your cluster, you may change the JDK version.

The choice of JDK depends on which HDP Stack you plan to install in your cluster. See the Hortonworks Support Matrix for version compatability information.

To change the JDK version for an existing cluster:

Steps

  1. Re-run Ambari Server Setup.

    ambari-server setup
  2. At the prompt to change the JDK, Enter y.

    Do you want to change Oracle JDK [y/n] (n)? y

  3. At the prompt to choose a JDK, Enter 1 to change the JDK to v1.8.

    [1] - Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8

    [2] - Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7

    [3] - Custom JDK

  4. If you choose Oracle JDK 1.8 or Oracle JDK 1.7, the JDK you choose downloads and installs automatically on the Ambari Server host. This option requires that you have an internet connection. You must install this JDK on all hosts in the cluster to this same path.

  5. If you choose Custom JDK, verify or add the custom JDK path on all hosts in the cluster. Use this option if you want to use OpenJDK or do not have an internet connection (and have pre-installed the JDK on all hosts).

    [Important]Important

    If you use a custom JDK, AND if Kerberos is enabled with AES-256 encryption, you must also update your JCE security policy files on the Ambari Server and all hosts in the cluster to match the new JDK version. If you are running Kerberos and do not update the JCE to match the JDK, you will have issues starting services.

  6. After setup completes, you must restart each component for the new JDK to be used by the Hadoop services.

  7. Using the Ambari Web UI, restart all services.

  8. Restart Ambari Server.

    ambari-server restart
[Note]Note

If, after upgrading the JDK to 1.8, you experience issues with communication between Ambari Server and Ambari Agents, refer to Java/Python updates and Ambari Agent TLS settings in Hortonworks Community Connection for more information.

More Information

Hortonworks Support Matrix

Restart Components

Installing the JCE

Java/Python Updates and Ambari Agent TLS Settings