Skip to content

Commit 72e72dd

Browse files
authored
Upgrade minimum JDK to 17 and migrate JavaX to Jakarta (#17859)
1 parent e9e3dd6 commit 72e72dd

81 files changed

Lines changed: 489 additions & 559 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/compile-check.yml‎

Lines changed: 0 additions & 67 deletions
This file was deleted.

‎.github/workflows/daily-it.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fail-fast: false
2121
max-parallel: 20
2222
matrix:
23-
java: [8, 17]
23+
java: [17]
2424
runs-on: [self-hosted, iotdb]
2525
# group: self-hosted
2626
# labels: iotdb
@@ -54,7 +54,7 @@ jobs:
5454
fail-fast: false
5555
max-parallel: 15
5656
matrix:
57-
java: [8, 17]
57+
java: [17]
5858
runs-on: [self-hosted, iotdb]
5959
# group: self-hosted
6060
# labels: iotdb

‎.github/workflows/daily-ut.yml‎

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,25 @@ env:
1313
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
1414
MAVEN_ARGS: --batch-mode --no-transfer-progress
1515
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
16+
JDK_VERSION: 17
1617

1718
jobs:
1819
unit-test:
1920
strategy:
2021
fail-fast: false
2122
max-parallel: 15
2223
matrix:
23-
java: [8]
24-
os: [ubuntu-latest, windows-latest]
24+
os: [ubuntu-latest, macos-latest, windows-latest]
2525
it_task: ["others", "datanode"]
26-
include:
27-
- java: 17
28-
os: macos-latest
29-
it_task: "datanode"
30-
- java: 17
31-
os: macos-latest
32-
it_task: "others"
3326
runs-on: ${{ matrix.os }}
3427

3528
steps:
3629
- uses: actions/checkout@v5
37-
- name: Set up JDK ${{ matrix.java }}
30+
- name: Set up JDK ${{ env.JDK_VERSION }}
3831
uses: actions/setup-java@v5
3932
with:
4033
distribution: corretto
41-
java-version: ${{ matrix.java }}
34+
java-version: ${{ env.JDK_VERSION }}
4235
env:
4336
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4437
- name: Cache Maven packages

‎.github/workflows/multi-language-client.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ jobs:
9494

9595
steps:
9696
- uses: actions/checkout@v5
97+
- name: Set up JDK 17
98+
uses: actions/setup-java@v5
99+
with:
100+
distribution: corretto
101+
java-version: 17
97102
- name: Install CPP Dependencies (Ubuntu)
98103
if: runner.os == 'Linux'
99104
shell: bash
@@ -187,6 +192,11 @@ jobs:
187192
with:
188193
token: ${{secrets.GITHUB_TOKEN}}
189194
submodules: recursive
195+
- name: Set up JDK 17
196+
uses: actions/setup-java@v5
197+
with:
198+
distribution: corretto
199+
java-version: 17
190200
- name: Cache Maven packages
191201
uses: actions/cache@v5
192202
with:
@@ -218,6 +228,11 @@ jobs:
218228
with:
219229
python-version: ${{ matrix.python }}
220230
- uses: actions/checkout@v5
231+
- name: Set up JDK 17
232+
uses: actions/setup-java@v5
233+
with:
234+
distribution: corretto
235+
java-version: 17
221236
- name: Cache Maven packages
222237
uses: actions/cache@v5
223238
with:

‎CLAUDE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ To run integration tests from IntelliJ: enable the `with-integration-tests` prof
103103
- **Apache License header**: Every new file committed to the repository MUST include the Apache License 2.0 header. Use the comment syntax appropriate for the file type (e.g., `<!-- -->` for `.md`, `/* */` for `.java`, `#` for `.properties`/`.py`). JSON files are exempt (no comment syntax). Refer to existing files in the repo for the exact format.
104104
- **Spotless** with Google Java Format (GOOGLE style). Import order: `org.apache.iotdb`, blank, `javax`, `java`, static.
105105
- **Checkstyle** is also configured (see `checkstyle.xml` at project root).
106-
- Java source/target level is 1.8 (compiled with `maven.compiler.release=8` on JDK 9+).
106+
- Java source/target level is 17 (compiled with `maven.compiler.release=17` on JDK 17+).
107107

108108
## Architecture
109109

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ plugin](https://github.com/diffplug/spotless/tree/main/plugin-maven) together wi
111111

112112
- Formatter: `clang-format` only
113113
- Version: pinned as `clang.format.version` in the root `pom.xml` (currently `17.0.6`, aligned with Apache TsFile); CI installs LLVM/clang-format so the default `clang-format` on the runner matches that version
114-
- Entrypoint: Maven Spotless; the `clangFormat` configuration is attached under the `spotless-cpp` profile in the C++ modules and activates only on **JDK 11+**, so run `spotless:check` / `spotless:apply` for C++ with JDK 11 or newer (CI does). JDK 8 builds elsewhere in the reactor do not load that Spotless fragment.
114+
- Entrypoint: Maven Spotless; the `clangFormat` configuration is attached under the `spotless-cpp` profile in the C++ modules and activates on the repository baseline, **JDK 17+**, so run `spotless:check` / `spotless:apply` for C++ with JDK 17 or newer (CI does).
115115

116116
Check only:
117117

‎Jenkinsfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pipeline {
3434

3535
tools {
3636
maven 'maven_3_latest'
37-
jdk 'jdk_11_latest'
37+
jdk 'jdk_17_latest'
3838
}
3939

4040
options {

‎LICENSE-binary‎

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,24 @@ com.google.guava.guava:32.1.2-jre
221221
com.fasterxml.jackson.core:jackson-annotations:2.16.2
222222
com.fasterxml.jackson.core:jackson-core:2.16.2
223223
com.fasterxml.jackson.core:jackson-databind:2.16.2
224-
jakarta.inject:jakarta.inject:2.6.1
224+
com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-base:2.18.6
225+
com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider:2.18.6
226+
com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:2.18.6
227+
io.swagger.core.v3:swagger-annotations-jakarta:2.2.50
228+
io.swagger.core.v3:swagger-core-jakarta:2.2.50
229+
io.swagger.core.v3:swagger-integration-jakarta:2.2.50
230+
io.swagger.core.v3:swagger-jaxrs2-jakarta:2.2.50
231+
io.swagger.core.v3:swagger-models-jakarta:2.2.50
232+
jakarta.inject:jakarta.inject-api:2.0.1
225233
at.yawk.lz4:lz4-java:1.10.0
226234
com.github.ben-manes.caffeine:caffeine:2.9.3
227-
org.eclipse.jetty:jetty-http:9.4.58.v20250814
228-
org.eclipse.jetty:jetty-io:9.4.58.v20250814
229-
org.eclipse.jetty:jetty-security:9.4.58.v20250814
230-
org.eclipse.jetty:jetty-server:9.4.58.v20250814
231-
org.eclipse.jetty:jetty-servlet:9.4.58.v20250814
232-
org.eclipse.jetty:jetty-util:9.4.58.v20250814
235+
org.eclipse.jetty:jetty-http:12.0.36
236+
org.eclipse.jetty:jetty-io:12.0.36
237+
org.eclipse.jetty:jetty-security:12.0.36
238+
org.eclipse.jetty:jetty-server:12.0.36
239+
org.eclipse.jetty:jetty-session:12.0.36
240+
org.eclipse.jetty.ee10:jetty-ee10-servlet:12.0.36
241+
org.eclipse.jetty:jetty-util:12.0.36
233242
com.google.code.findbugs:jsr305:3.0.2
234243
com.librato.metrics:librato-java:2.1.0
235244
org.apache.thrift:libthrift:0.14.1
@@ -257,7 +266,7 @@ io.airlift.airline:0.9
257266

258267
BSD 3-Clause
259268
------------
260-
org.antlr:antlr-runtime:4.9.3
269+
org.antlr:antlr4-runtime:4.13.2
261270
org.ow2.asm:asm:9.3
262271
org.jline:jline:3.26.2
263272

@@ -271,19 +280,29 @@ MIT License
271280
------------
272281
org.slf4j:slf4j-api:2.0.9
273282
com.bugsnag:bugsnag:3.7.2
283+
io.github.classgraph:classgraph:4.8.184
274284

275285

276286
EPL 1.0
277287
------------
278288
com.h2database:h2-mvstore:2.1.212
279-
ch.qos.logback:logback-classic:1.3.15
280-
ch.qos.logback:logback-core:1.3.15
289+
290+
291+
EPL 2.0
292+
------------
293+
ch.qos.logback:logback-classic:1.5.34
294+
ch.qos.logback:logback-core:1.5.34
295+
jakarta.annotation:jakarta.annotation-api:3.0.0
296+
jakarta.servlet:jakarta.servlet-api:6.0.0
297+
298+
EDL 1.0
299+
------------
300+
jakarta.activation:jakarta.activation-api:2.1.0
301+
jakarta.xml.bind:jakarta.xml.bind-api:3.0.1
281302

282303

283304
CDDL 1.1
284305
------------
285-
jakarta.annotation:jakarta.annotation-api:1.3.5
286-
jakarta.servlet:jakarta.servlet-api:4.0.4
287306
javax.xml.bind:jaxb-api:2.4.0-b180725.0427
288307
org.glassfish.jaxb:jaxb-runtime:2.3.6
289308

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
![](https://github-size-badge.herokuapp.com/apache/iotdb.svg)
2929
![](https://img.shields.io/github/downloads/apache/iotdb/total.svg)
3030
![](https://img.shields.io/badge/platform-win%20%7C%20macos%20%7C%20linux-yellow.svg)
31-
![](https://img.shields.io/badge/java--language-1.8+-blue.svg)
31+
![](https://img.shields.io/badge/java--language-17+-blue.svg)
3232
[![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/)
3333
[![Maven Central](https://img.shields.io/maven-central/v/org.apache.iotdb/iotdb-parent.svg)](https://central.sonatype.com/artifact/org.apache.iotdb/iotdb-parent)
3434
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/apache/iotdb)
@@ -89,7 +89,7 @@ This short guide will walk you through the basic process of using IoTDB. For a m
8989

9090
To use IoTDB, you need to have:
9191

92-
1. Java >= 1.8 (1.8 to 25 are verified. Please make sure the environment path has been set accordingly).
92+
1. Java >= 17 (17 to 25 are verified. Please make sure the environment path has been set accordingly).
9393
2. Maven >= 3.6 (If you want to compile and install IoTDB from source code).
9494
3. Set the max open files num as 65535 to avoid the "too many open files" error.
9595
4. (Optional) Set the somaxconn as 65535 to avoid "connection reset" error when the system is under high load.

‎README_ZH.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
![](https://github-size-badge.herokuapp.com/apache/iotdb.svg)
2929
![](https://img.shields.io/github/downloads/apache/iotdb/total.svg)
3030
![](https://img.shields.io/badge/platform-win%20%7C%20macos%20%7C%20linux-yellow.svg)
31-
![](https://img.shields.io/badge/java--language-1.8+-blue.svg)
31+
![](https://img.shields.io/badge/java--language-17+-blue.svg)
3232
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/apache/iotdb.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/iotdb/context:java)
3333
[![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/)
3434
[![Maven Central](https://img.shields.io/maven-central/v/org.apache.iotdb/iotdb-parent.svg)](https://central.sonatype.com/artifact/org.apache.iotdb/iotdb-parent)
@@ -86,7 +86,7 @@ IoTDB的主要特点如下:
8686
## 环境准备
8787

8888
要使用IoTDB,您需要:
89-
1. Java >= 1.8 (目前 1.8 到 25 已经被验证可用。请确保环变量境路径已正确设置)。
89+
1. Java >= 17 (目前 17 到 25 已经被验证可用。请确保环变量境路径已正确设置)。
9090
2. Maven >= 3.6 (如果希望从源代码编译和安装IoTDB)。
9191
3. 设置 max open files 为 65535,以避免"too many open files"错误。
9292
4. (可选) 将 somaxconn 设置为 65535 以避免系统在高负载时出现 "connection reset" 错误。

0 commit comments

Comments
 (0)