Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JDK 21] Build and run Trino on JDK 21 #17017

Closed
9 of 13 tasks
wendigo opened this issue Apr 13, 2023 · 22 comments · Fixed by #20010
Closed
9 of 13 tasks

[JDK 21] Build and run Trino on JDK 21 #17017

wendigo opened this issue Apr 13, 2023 · 22 comments · Fixed by #20010
Assignees
Labels
enhancement New feature or request roadmap Top level issues for major efforts in the project

Comments

@wendigo
Copy link
Contributor

wendigo commented Apr 13, 2023

Known problems:

@wendigo wendigo added the enhancement New feature or request label Apr 13, 2023
@wendigo
Copy link
Contributor Author

wendigo commented Apr 13, 2023

With the ./mvnw clean install -DskipTests -nsu -T 1C -U -Dair.check.skip-enforcer -Dair.check.skip-modernizer and:

I was able to compile Trino with JDK 21 as a target.

I'm gonna submit the PR to maven-dependency-plugin and maven-enforcer-plugin

@wendigo
Copy link
Contributor Author

wendigo commented Apr 13, 2023

I've been able to compile and run Trino with mentioned changes on JDK 21:

❯ docker run trino:413-SNAPSHOT-arm64
+ launcher_opts=(--etc-dir /etc/trino)
+ grep -s -q node.id /etc/trino/node.properties
+ launcher_opts+=("-Dnode.id=${HOSTNAME}")
+ exec /usr/lib/trino/bin/launcher run --etc-dir /etc/trino -Dnode.id=f553225d9acc
WARNING: Support for the ARM architecture is experimental
# WARNING: Unable to attach Serviceability Agent. You can try again with escalated privileges. Two options: a) use -Djol.tryWithSudo=true to try with sudo; b) echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
Apr 13, 2023 10:41:20 AM io.airlift.log.Logger info
INFO: Java version: 21-ea

Querying TPCH works just fine :)

@wendigo
Copy link
Contributor Author

wendigo commented Apr 13, 2023

https://github.com/apache/maven-dependency-analyzer was already upgraded to ASM 9.5 and released so I assume that it will soon land in maven-dependency-plugin

@chenjian2664
Copy link
Contributor

OMG, JDK21 is available 😱

@wendigo
Copy link
Contributor Author

wendigo commented Apr 13, 2023

@chenjian2664 it's not ;) Targeted for September but we want to be prepared to switch to it

@chenjian2664
Copy link
Contributor

@wendigo So cool

@hashhar hashhar added the roadmap Top level issues for major efforts in the project label Apr 14, 2023
@wendigo wendigo changed the title Build and run Trino on JDK 21 [JDK 21] Build and run Trino on JDK 21 Apr 15, 2023
@wendigo
Copy link
Contributor Author

wendigo commented Apr 15, 2023

Related: #17044

@wendigo
Copy link
Contributor Author

wendigo commented May 13, 2023

Related: #17484

@wendigo
Copy link
Contributor Author

wendigo commented May 31, 2023

airlift/airbase#359 fixes maven plugins compatibility

@wendigo
Copy link
Contributor Author

wendigo commented May 31, 2023

I've just verified that error-prone HEAD works fine with JDK 21 after google/error-prone#3918

@wendigo
Copy link
Contributor Author

wendigo commented Jun 1, 2023

airlift/airbase#359

@wendigo
Copy link
Contributor Author

wendigo commented Jun 2, 2023

#17740

@wendigo
Copy link
Contributor Author

wendigo commented Jun 7, 2023

diff --git a/pom.xml b/pom.xml
index 3e6fdb8d73..e01e285d30 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,7 +60,7 @@
         <dep.drift.version>1.14</dep.drift.version>
         <dep.tempto.version>196</dep.tempto.version>
         <dep.gcs.version>2.2.8</dep.gcs.version>
-        <dep.errorprone.version>2.19.1</dep.errorprone.version>
+        <dep.errorprone.version>HEAD-SNAPSHOT</dep.errorprone.version>
         <dep.testcontainers.version>1.18.3</dep.testcontainers.version>
         <dep.duct-tape.version>1.0.8</dep.duct-tape.version>
         <dep.coral.version>2.0.153</dep.coral.version>
@@ -206,6 +206,19 @@
         <module>testing/trino-tests</module>
     </modules>

+    <repositories>
+        <repository>
+            <id>oss.sonatype.org-snapshot</id>
+            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </repository>
+    </repositories>
+
     <dependencyManagement>
         <dependencies>
             <!-- Trino -->
@@ -2074,6 +2087,7 @@
                                     <exclude>com.google.guava:guava</exclude>
                                     <exclude>com.fasterxml.jackson.core:jackson-core</exclude>
                                     <exclude>com.google.j2objc:j2objc-annotations</exclude>
+                                    <exclude>com.google.errorprone:error_prone_annotations</exclude>
                                 </excludes>
                             </requireUpperBoundDeps>
                             <bannedDependencies>

error-prone HEAD-SNAPSHOT is working with jdk 21

@wendigo
Copy link
Contributor Author

wendigo commented Jun 7, 2023

#17770

@wendigo
Copy link
Contributor Author

wendigo commented Jun 16, 2023

@wendigo
Copy link
Contributor Author

wendigo commented Jun 16, 2023

#17941

@wendigo
Copy link
Contributor Author

wendigo commented Jul 13, 2023

Blocked by #18272 (it's a regression starting with JDK 20)

@wendigo
Copy link
Contributor Author

wendigo commented Sep 13, 2023

Requires #18931 (dropping HDP2.6 images which are based on Centos6 shipped with old glibc. This prevents installing Temurin JDK 21 and other builds)

@mosabua
Copy link
Member

mosabua commented Nov 3, 2023

Trino 432 now uses Java 21 in the Trino Docker image.

@mosabua
Copy link
Member

mosabua commented Nov 3, 2023

The 0.14.0 release of the Trino Helm charts https://github.com/trinodb/charts now uses Trino 432 and therefore Java 21.

@mosabua
Copy link
Member

mosabua commented Nov 3, 2023

The blog post https://trino.io/blog/2023/11/03/java-21 announces our plans to require Java 21 and asks for feedback and testing reports.

@mosabua
Copy link
Member

mosabua commented Nov 3, 2023

Announced on Trino slack and linkedin
as well https://www.linkedin.com/feed/update/urn:li:activity:7126324119733686272

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request roadmap Top level issues for major efforts in the project
4 participants