Since 1.0.0, Pinot has dropped support for Java 8, and since then, the minimum source and runtime Java version is 11.
This document proposes increasing the minimum to Java 21 in the future.
This proposal doesn't affect the Pinot JDBC Driver or Pinot Connectors, which will still support Java 8. Pinot connectors are the drivers we provide for Flink and Spark. This means they are libraries/plugins that are designed to be deployed in Flink and Spark processes.
Current state
Pinot officially supports Java 11 and 21. At least, these are the versions we test.
Docker images use Java 11, 17 and 21.
The default docker image (the one tagged as latest) is Java 11.
A Java program compiled with Java 11 should be able to run on Java 11, 17, 21, 25, etc, without changes as
long as it only uses public APIs.
That is not the case for Pinot, which uses some internal APIs unavailable in Java 11.
These APIs are mainly used to get access to low-level features like network or memory management.
Specifically, we had some issues running in Java 21, given we were using some internal APIs through LArray to get
access to off-heap buffers larger than 2GBs.
These issues were fixed in #11656, and since Sept 2023
(#11672) all Pinot tests are executed in both Java 11 and 21.
Java versions
Java 8, 11, 17, and 21 are LTS versions, which officially means that Oracle supports them for a longer time than non-LTS versions.
In practice, other vendors like AdoptOpenJDK, Amazon, Azul, BellSoft, IBM, Red Hat, and others follow the same model
and support versions marked by Oracle as LTS for a longer time.
Java 11 is the first LTS version after Java 8, the minimum version for many projects.
The situation with Java 11 is becoming similar to that of Python 2.7, where many projects are stuck with it and it is hard to move forward.
This seems to be changing slowly.
Oracle and RedHat stopped supporting Java 11 in 2023 and 2024, respectively, and popular libraries/frameworks like
Spring Framework 6, Hibernate 6 or Micronaut 4 require Java 17.
Oracle support for Java 17 will end in 2026, and RedHat will support it until 2027.
Java 21 is the latest LTS version, and it is supported by Oracle until 2028 and by RedHat until 2029.
Java 25 is the next LTS release. It will be released in September 2025 and supported by Oracle until 2030 and by RedHat
until 2031.
Source vs runtime versions
The source version is the minimum Java version required to compile the code.
In Java this version is also the minimum runtime version.
Since Pinot 1.0.0, we are using Java 11 as the minimum source and runtime version, although the recommended runtime
version is Java 21, given it provides better performance and more runtime features like new GCs.
Cons of the update
Increasing the minimum Java version would have the inconvenience that users would need to install and use a newer Java
version.
This shouldn't be a problem given that Java 21 is already supported by all vendors and in fact, Java 11 is not supported
by most of them, but we know that some users move slowly to newer versions.
That is why, even though we can run Pinot in Java 21, we are still using 11 as the source version.
This should be completely transparent for users that run Pinot using Kubernetes or Docker, given the runtime Java version is included in the Docker images.
Pros of the update
The main reason to increase the minimum Java version is to be able to use new features and improvements in the Java
language and also runtime.
Although we can get some of the Java 21 performance improvements by running Pinot in Java 21, we can't use some of
them.
Things we cannot use go from nice to have programming features but also to important performance improvements, including:
- Code level improvements:
- Performance improvements
Proposal
- Open this issue to discuss how to proceed.
- Get feedback from the community to try to find out if there are users who would be affected by this change.
- If the community agrees, we will update the minimum Java version to Java 21. This change may be done for Pinot 1.4.0
or for a future release.
Alternatives
Upgrade to Java 17 first
Although Java 17 is also LTS, it will be EOL for Oracle and RedHat in 2026 and 2027, respectively.
It also doesn't include any of the performance improvements listed above.
We also run tests in Java 21, so we are confident that Pinot works in Java 21.
We could consider upgrading to Java 17 as a first step to make the transition easier for our users,
but we would need to upgrade to Java 21 shortly.
Keep Java 11 as the minimum version and ignore new features
We could keep Java 11 as the minimum version and consider upgrading to Java 21 in a future release.
This would allow users to keep using Java 11 longer, but we would not be able to use new features and
some performance improvements in Java 21.
Keep Java 11 as the minimum version and use plugins for new features
We could keep Java 11 as the minimum version and use plugins to provide new features.
This means developers won't be able to use new features in the Java language, but we could provide some
performance improvements by using plugins.
The main disadvantage of this approach is that it would require more work from developers.
It is not easy to maintain a plugin that requires a Java version that is different from the main code.
This was, in fact, the main blocker of #12809 and why we decided to
stop working on it.
The corollary of this is that it is an incentive to create forks or separate projects that may not be open-source
to add support for these new features, which is not ideal.
Since 1.0.0, Pinot has dropped support for Java 8, and since then, the minimum source and runtime Java version is 11.
This document proposes increasing the minimum to Java 21 in the future.
This proposal doesn't affect the Pinot JDBC Driver or Pinot Connectors, which will still support Java 8. Pinot connectors are the drivers we provide for Flink and Spark. This means they are libraries/plugins that are designed to be deployed in Flink and Spark processes.
Current state
Pinot officially supports Java 11 and 21. At least, these are the versions we test.
Docker images use Java 11, 17 and 21.
The default docker image (the one tagged as
latest) is Java 11.A Java program compiled with Java 11 should be able to run on Java 11, 17, 21, 25, etc, without changes as
long as it only uses public APIs.
That is not the case for Pinot, which uses some internal APIs unavailable in Java 11.
These APIs are mainly used to get access to low-level features like network or memory management.
Specifically, we had some issues running in Java 21, given we were using some internal APIs through LArray to get
access to off-heap buffers larger than 2GBs.
These issues were fixed in #11656, and since Sept 2023
(#11672) all Pinot tests are executed in both Java 11 and 21.
Java versions
Java 8, 11, 17, and 21 are LTS versions, which officially means that Oracle supports them for a longer time than non-LTS versions.
In practice, other vendors like AdoptOpenJDK, Amazon, Azul, BellSoft, IBM, Red Hat, and others follow the same model
and support versions marked by Oracle as LTS for a longer time.
Java 11 is the first LTS version after Java 8, the minimum version for many projects.
The situation with Java 11 is becoming similar to that of Python 2.7, where many projects are stuck with it and it is hard to move forward.
This seems to be changing slowly.
Oracle and RedHat stopped supporting Java 11 in 2023 and 2024, respectively, and popular libraries/frameworks like
Spring Framework 6, Hibernate 6 or Micronaut 4 require Java 17.
Oracle support for Java 17 will end in 2026, and RedHat will support it until 2027.
Java 21 is the latest LTS version, and it is supported by Oracle until 2028 and by RedHat until 2029.
Java 25 is the next LTS release. It will be released in September 2025 and supported by Oracle until 2030 and by RedHat
until 2031.
Source vs runtime versions
The source version is the minimum Java version required to compile the code.
In Java this version is also the minimum runtime version.
Since Pinot 1.0.0, we are using Java 11 as the minimum source and runtime version, although the recommended runtime
version is Java 21, given it provides better performance and more runtime features like new GCs.
Cons of the update
Increasing the minimum Java version would have the inconvenience that users would need to install and use a newer Java
version.
This shouldn't be a problem given that Java 21 is already supported by all vendors and in fact, Java 11 is not supported
by most of them, but we know that some users move slowly to newer versions.
That is why, even though we can run Pinot in Java 21, we are still using 11 as the source version.
This should be completely transparent for users that run Pinot using Kubernetes or Docker, given the runtime Java version is included in the Docker images.
Pros of the update
The main reason to increase the minimum Java version is to be able to use new features and improvements in the Java
language and also runtime.
Although we can get some of the Java 21 performance improvements by running Pinot in Java 21, we can't use some of
them.
Things we cannot use go from nice to have programming features but also to important performance improvements, including:
varkeyword (https://openjdk.java.net/jeps/286)instanceofpattern matching (https://openjdk.java.net/jeps/394),switchexpressions (https://openjdk.java.net/jeps/361)sealedclasses (https://openjdk.org/jeps/409)recordclasses (https://openjdk.java.net/jeps/395)Proposal
or for a future release.
Alternatives
Upgrade to Java 17 first
Although Java 17 is also LTS, it will be EOL for Oracle and RedHat in 2026 and 2027, respectively.
It also doesn't include any of the performance improvements listed above.
We also run tests in Java 21, so we are confident that Pinot works in Java 21.
We could consider upgrading to Java 17 as a first step to make the transition easier for our users,
but we would need to upgrade to Java 21 shortly.
Keep Java 11 as the minimum version and ignore new features
We could keep Java 11 as the minimum version and consider upgrading to Java 21 in a future release.
This would allow users to keep using Java 11 longer, but we would not be able to use new features and
some performance improvements in Java 21.
Keep Java 11 as the minimum version and use plugins for new features
We could keep Java 11 as the minimum version and use plugins to provide new features.
This means developers won't be able to use new features in the Java language, but we could provide some
performance improvements by using plugins.
The main disadvantage of this approach is that it would require more work from developers.
It is not easy to maintain a plugin that requires a Java version that is different from the main code.
This was, in fact, the main blocker of #12809 and why we decided to
stop working on it.
The corollary of this is that it is an incentive to create forks or separate projects that may not be open-source
to add support for these new features, which is not ideal.