Custom Java settings

This article describes the installation of a custom Java for a specific service. In this case, JDK version 23.0.2 is installed for Trino specifically.

Install Java

  1. Download the Java version you need on all hosts:

    $ wget https://download.oracle.com/java/23/archive/jdk-23.0.2_linux-x64_bin.tar.gz
  2. Create a directory for custom Java on all hosts:

    $ mkdir -p /tmp/jvm-example
  3. Unpack the package by the created path on all hosts:

    $ sudo tar -xzf jdk-23.0.2_linux-x64_bin.tar.gz -C /tmp/jvm-example
  4. Check Java installation by running the command below to determine that the required Java version is used:

    $ /tmp/jvm-example/jdk-23.0.2/bin/java --version

    The output:

    java 23.0.2 2025-01-21
    Java(TM) SE Runtime Environment (build 23.0.2+7-58)
    Java HotSpot(TM) 64-Bit Server VM (build 23.0.2+7-58, mixed mode, sharing)

Change Java settings in Trino

Go to ADCM interface and follow the steps below:

  1. On the Clusters page, select the desired cluster.

  2. Go to the Services tab and click at Trino.

  3. Find and edit the ad-runtime-utils parameter as follows:

    runtimes:
      java:
        version: "23.0.2"
        override_path: /tmp/jvm-example
        env_var: JAVA_HOME
  4. Click Apply and confirm changes to cluster configuration by clicking Save.

  5. In the Actions drop-down menu, select Restart, make sure the Apply configs from ADCM option is set to true, and click Run.

ad-runtime-utils parameter in Trino configuration
ad-runtime-utils parameter in Trino configuration
Found a mistake? Seleсt text and press Ctrl+Enter to report it