Configure Java Versions for Big Data Service Components
Oracle Cloud Infrastructure Big Data Service supports component-level Java runtime selection for selected open source components. This selection lets you run each supported component with a Java version that's compatible with that component and available on the cluster.
You can select the Java runtime from the JAVA_HOME dropdown in the component's configuration section in Apache Ambari. The change takes effect after the affected service is restarted.
Supported Components and Java Versions
The following components support Java runtime selection,
| Component | Supported Java versions | Default Java selected |
|---|---|---|
| Kafka | Java 8, Java 11 | Java 11 for BDS versions later than 3.4.0 |
| Flink | Java 8, Java 11 | Java 11 for BDS versions later than 3.4.0 |
| Hive | Java 8, Java 11 | Java 11 for BDS versions later than 3.4.0 |
| Trino | Java 21 | Java 21 |
| Ranger | Java 17 | Java 17 |
| Spark | Java 8, Java 11 | Java 11 for BDS versions later than 3.4.0 |
Only the Java versions listed for a component are supported for that component. Components that aren't listed continue to use the cluster default Java runtime.
The default Java runtime applies when a new cluster or component configuration is created. Existing clusters continue to use their previously configured Java runtime until you change the JAVA_HOME value and restart the service.
Availability and Existing Clusters
Java runtime selection is part of the Big Data Service 3.4.0 release. For older clusters, this feature is available after ODH patch 2.2.2 is applied. The Java versions available for selection can depend on the cluster image and patch level.
For existing clusters that are updated to a release with Multi JDK support, components continue to use their previously configured Java runtime until you change the JAVA_HOME value and restart the service.
How Java Runtime Selection Works
Big Data Service validates and applies the selected Java runtime at the component level.
- Ambari shows a
JAVA_HOMEdropdown in the configuration section for supported components. - The dropdown includes only the Java versions supported by that component in the current Big Data Service release.
- When you save the configuration and restart the service, Big Data Service updates the runtime configuration for that component.
- The component startup scripts resolve
JAVA_HOMEduring service start. Runtime changes aren't hot-swapped into already running processes.
Changing JAVA_HOME changes the Java runtime used to start the component. It doesn't rebuild or change the component binaries.
Before You Begin
Before changing a component's Java runtime, complete the following checks:
- Ensure you have Ambari administrator access.
- Confirm that the Java version you plan to select is supported for the component.
- Plan for a service restart. Java runtime changes are applied only after restart.
- Check that the affected service is healthy before making the change.
Change the Java Runtime for a Component
- Sign in to Ambari for the Big Data Service cluster.
- In the Ambari navigation menu, select the component service that you want to update, such as Kafka, Hive, Spark, Flink, Trino, or Ranger.
- Open the service's configuration section.
- Locate the
JAVA_HOMEconfiguration. - From the
JAVA_HOMEdropdown, select a supported Java version for that component. - Save the configuration.
- Review and confirm the Ambari configuration changes.
- Restart the affected service when Ambari prompts for a restart.
- After restart, verify that the service is healthy.
Repeat these steps for each component that needs a different Java runtime.
Example
To run Spark with Java 11:
- In Ambari, select the Spark service.
- Open the Spark configuration section.
- Set
JAVA_HOMEto the Java 11 option. - Save the configuration.
- Restart Spark.
- Confirm that Spark is healthy after restart.
Kafka, Flink, and Hive can also be configured to use Java 11 by following the same pattern. Trino supports Java 21. Ranger supports Java 17.
Operational Notes
- A component can use only one Java runtime at a time.
- Different supported components can use different Java runtimes on the same cluster.
- Changing a Java runtime requires a service restart.
- Java runtime patching is handled separately from Ambari configuration changes.
- On SSL-enabled clusters, components continue to use the configured cluster truststore. Ensure any custom truststore configuration remains valid after changing Java versions.
Troubleshooting
Java Version Isn't Available in the Dropdown
The Java version might not be supported for that component in the current Big Data Service release. Select one of the versions listed in the dropdown.
Configuration Save or Restart Fails
Review the Ambari operation output for validation errors, then save the configuration and restart the service again.
Service Doesn't Start After Changing Java Version
Review the Ambari operation output and component logs. If needed, select the previous supported Java runtime in the JAVA_HOME dropdown, save the configuration, and restart the service. If the service restart still fails after JAVA_HOME is changed from Ambari, raise a service request (SR) with Oracle Support.
Component Behavior Changes After Java Runtime Update
Some workloads can be sensitive to Java runtime changes, especially where garbage collection, memory settings, or third-party libraries are involved. Validate critical workloads after changing Java versions and adjust component-specific JVM options if required.