Administering Ambari
Also available as:
PDF
loading table of contents...

Changing your JDK

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.

Hortonworks HDP 2.6.x and 3.x platforms support both Oracle JDK 8 and Open JDK 8 versions. HDP does not bundle either JDK libraries but certify HDP components using both Oracle and Open JDK libraries. Oracle announced Oracle JDK 11 release in September 2018 that requires support subscription. Please note that Oracle will not post further updates of Java SE 8 to its public download sites for commercial use after January 2019. Customers who need continued access to critical bug fixes and security fixes as well as general maintenance for Java SE 8 or previous versions can get long term support through Oracle Java SE Subscription or Oracle Java SE Desktop Subscription. For further details on Oracle JDK, please see the Oracle Java SE Support Roadmap.

To change the JDK implementation for an existing cluster:

  1. On the Ambari Server host, re-run Ambari Server Setup.
    ambari-server setup
  2. At the prompt: change the JDK ?, Enter y.
  3. At the prompt: Do you want to change Oracle JDK [y/n] (n)?, Enter y.
  4. At the prompt:choose a JDK:, Enter 2 to change the JDK implementation.
    OptionDescription
    [1] - Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8 If you choose Oracle JDK 1.8, the JDK you choose downloads and installs automatically on the Ambari Server host. This option requires that you have an internet connection as the Ambari Server will download and install this JDK on all hosts in the cluster.
    [2] - Custom JDK 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.
After setup completes, you must restart each component for the new JDK to be used by the Hadoop services. Using the Ambari Web UI, do the following tasks:
  1. Restart Ambari Server.

    ambari-server restart

  2. Log in to the Ambari Server and restart all cluster services.
Important
Important

If, after changing the JDK, 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.

Additionally if customer certificates were imported into the previous JDK’s cacerts trust store, they need to be re-imported into the new JDK’s cacerts trust store. See Preparing for LDAPS integration for more details.