Help Center/ MapReduce Service/ Developer Guide (LTS)/ JDK Support by MRS Cluster Components
Updated on 2026-06-29 GMT+08:00

JDK Support by MRS Cluster Components

This section applies only to MRS 3.6.0 or later.

To address the limitations of legacy JDK in terms of performance optimization, security updates and new feature support, the JDK of components in MRS clusters has been upgraded. This significantly boosts cluster stability, operational efficiency, and security posture.

  • Java process of all component servers in the MRS clusters runs in JDK 21 by default. For details about the support for JDK, see Table 1.
  • MRS cluster clients use JDK 8 by default. You can change the JDK version based on service requirements.

    For details, see Changing the JDK Version Used by the MRS Cluster Client.

  • MRS clusters use JDK 8 by default when running computing tasks. You can change the JDK version based on service requirements.

    Supported components: MapReduce, Flink, Spark, and Hive (including the MapReduce and Tez engines)

  • For components that support UDFs, given that the UDFs must be embedded in the main process of JDK 21, ensure that the programs are compatible with JDK 21 when using UDFs developed in JDK 8 or JDK 17.
    • The upgraded HetuEngine kernel can use only JDK 21.
    • The Doris UDFs generally run in JDK 21 environment. To use UDFs developed in JDK 8 or JDK 17 environment, compatibility verification is required.
    • You can set the JDK version for executing UDFs in ClickHouse.
Table 1 JDK support by MRS cluster components

Component

Server JDK Version

Client JDK Version

JDK Support by Secondary Development and Constraints

Default JDK Compilation Version for Secondary Development

ClickHouse

JDK 21

N/A

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8

DBService

JDK 21

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8, JDK 17, and JDK 21 are supported.

JDK 21

Doris

JDK 21

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8, JDK 17, and JDK 21 are supported.

JDK 21

Flink

JDK 21

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8

Flume

JDK 21

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8, JDK 17, and JDK 21 are supported.

JDK 21

FTP-Server

JDK 21

N/A

N/A

N/A

Guardian

JDK 21

JDK 8, JDK 17, and JDK 21 are supported.

N/A

N/A

HBase

JDK 21

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8 and JDK 21 are supported.

JDK 8

HetuEngine

JDK 21

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8

HDFS

JDK 21

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8

Hive

JDK 21

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8, JDK 17, and JDK 21 are supported.

For details about how to change the JDK version used during computing task running, see Configuring the JDK Version Used During Hive Job Running.

JDK 8

Hudi

N/A

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8

Hue

N/A

N/A

N/A

N/A

Iceberg

N/A

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8, JDK 17, and JDK 21 are supported.

JDK 21

Impala

JDK 21

N/A

N/A

N/A

JobGateway

JDK 21

JDK 8, JDK 17, and JDK 21 are supported.

N/A

JDK 21

Kafka

JDK 21

JDK 8 and JDK 17 are supported.

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8

KrbServer

N/A

N/A

N/A

N/A

Loader

JDK 21

JDK 21 is supported.

N/A

N/A

LdapServer

N/A

N/A

N/A

N/A

MapReduce

JDK 21

N/A

JDK 8, JDK 17, and JDK 21 are supported.

By default, JDK 8 is used for running MapReduce jobs. To use JDK 17 or JDK 21, perform the following operations:

  • Change the value of mapreduce.java.home.alias in Client installation path/Yarn/config/mapred-site.xml file and Client installation path/HDFS/hadoop/etc/hadoop/mapred-site.xml file to the JDK version to be used.
    • JDK 8: JAVA_HOME
    • JDK 17: JAVA_HOME_17
    • JDK 21: JAVA_HOME_21
  • Log in to Manager and change the value of YARN service parameter mapreduce.task.jdk.version to the JDK version to be used, for example, JDK8, JDK17, or JDK21.

JDK 8

MemArtsCC

N/A

JDK 8, JDK 17, and JDK 21 are supported.

N/A

N/A

MemArtsStore

N/A

JDK 8, JDK 17, and JDK 21 are supported.

N/A

N/A

Oozie

JDK 21

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8

Phoenix

JDK 21

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8 and JDK 21 are supported.

JDK 8

Ranger

JDK 21

N/A

N/A

N/A

Spark

JDK 21

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8

Sqoop

N/A

JDK 8, JDK 17, and JDK 21 are supported.

N/A

N/A

Tez

JDK 21

JDK 21 is supported.

N/A

N/A

YARN

JDK 21

JDK 8, JDK 17, and JDK 21 are supported.

N/A

N/A

ZooKeeper

JDK 21

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8, JDK 17, and JDK 21 are supported.

JDK 8

Changing the JDK Version Used by the MRS Cluster Client

MRS cluster clients use JDK 8 by default. If you want to change the JDK version, perform the following operations:

  1. Install the JDK to be used on the client installation node. For example, install JDK 17.0.13 in the Client installation directory/JDK directory.
  2. Log in to the client installation node as the client installation user.
  3. Modify the component_env file.

    vi Client installation directory/JDK/component_env

    Change the value of export JAVA_HOME to the path of the new JDK file. For example:

    export JAVA_HOME="Client installation directory/JDK/jdk17.0.13"

  4. Configure the environment variables on the client to use the JDK of the new version.

    source Client installation directory/bigdata_env

    The target 8 option must be enabled during compilation of the JAR package used on the client.