From fdf0db06307b54981fa9232eb897dc7b1eedcfa0 Mon Sep 17 00:00:00 2001 From: HTHou Date: Fri, 5 Jun 2026 18:12:40 +0800 Subject: [PATCH 1/2] Upgrade minimum JDK to 17 --- .github/workflows/code-coverage.yml | 5 +++ .github/workflows/unit-test-cpp.yml | 6 +++ .github/workflows/unit-test-java.yml | 2 +- .github/workflows/unit-test-python.yml | 6 +++ Jenkinsfile | 2 +- .../develop/QuickStart/QuickStart.md | 2 +- .../develop/QuickStart/QuickStart.md | 2 +- java/CLAUDE.md | 2 +- java/examples/pom.xml | 3 +- java/pom.xml | 9 ++--- java/tools/README-zh.md | 3 +- java/tools/README.md | 2 +- java/tsfile/README-zh.md | 2 +- java/tsfile/README.md | 2 +- pom.xml | 38 ++++++------------- 15 files changed, 42 insertions(+), 44 deletions(-) diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 7bb176370..aa565a652 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -20,6 +20,11 @@ jobs: steps: - uses: actions/checkout@v6 + - name: Set up JDK 17 + uses: actions/setup-java@v5 + with: + distribution: corretto + java-version: 17 - name: Cache Maven packages uses: actions/cache@v5 with: diff --git a/.github/workflows/unit-test-cpp.yml b/.github/workflows/unit-test-cpp.yml index 6f746deca..701117269 100644 --- a/.github/workflows/unit-test-cpp.yml +++ b/.github/workflows/unit-test-cpp.yml @@ -80,6 +80,12 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 + - name: Set up JDK 17 + uses: actions/setup-java@v5 + with: + distribution: corretto + java-version: 17 + # Setup caching of the artifacts in the .m2 directory, so they don't have to # all be downloaded again for every build. - name: Cache Maven packages diff --git a/.github/workflows/unit-test-java.yml b/.github/workflows/unit-test-java.yml index bbead7a92..053af613a 100644 --- a/.github/workflows/unit-test-java.yml +++ b/.github/workflows/unit-test-java.yml @@ -44,7 +44,7 @@ jobs: fail-fast: false max-parallel: 15 matrix: - java: [ 8, 17, 25 ] + java: [ 17, 21, 25 ] os: [ ubuntu-latest, macos-latest, windows-latest ] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/unit-test-python.yml b/.github/workflows/unit-test-python.yml index 63d547c0b..7925b5bbc 100644 --- a/.github/workflows/unit-test-python.yml +++ b/.github/workflows/unit-test-python.yml @@ -57,6 +57,12 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Set up JDK 17 + uses: actions/setup-java@v5 + with: + distribution: corretto + java-version: 17 + # Setup caching of the artifacts in the .m2 directory, so they don't have to # all be downloaded again for every build. - name: Cache Maven packages diff --git a/Jenkinsfile b/Jenkinsfile index c45b117a5..cb60516fd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,7 +34,7 @@ pipeline { tools { maven 'maven_3_latest' - jdk 'jdk_11_latest' + jdk 'jdk_17_latest' } options { diff --git a/docs/src/UserGuide/develop/QuickStart/QuickStart.md b/docs/src/UserGuide/develop/QuickStart/QuickStart.md index e0aca68ba..addd2e59b 100644 --- a/docs/src/UserGuide/develop/QuickStart/QuickStart.md +++ b/docs/src/UserGuide/develop/QuickStart/QuickStart.md @@ -22,7 +22,7 @@ ## Dependencies -- JDK >=1.8 +- JDK >=17 - Maven >=3.6 ## Installation Method diff --git a/docs/src/zh/UserGuide/develop/QuickStart/QuickStart.md b/docs/src/zh/UserGuide/develop/QuickStart/QuickStart.md index d249749bf..3c90e2b7b 100644 --- a/docs/src/zh/UserGuide/develop/QuickStart/QuickStart.md +++ b/docs/src/zh/UserGuide/develop/QuickStart/QuickStart.md @@ -22,7 +22,7 @@ ## 依赖 -- JDK >=1.8 +- JDK >=17 - Maven >=3.6 ## 安装 diff --git a/java/CLAUDE.md b/java/CLAUDE.md index 5bf444a04..91aa7d858 100644 --- a/java/CLAUDE.md +++ b/java/CLAUDE.md @@ -81,7 +81,7 @@ Code generation: FreeMarker templates in `tsfile/src/main/codegen/` generate typ ## Code Style -- **Formatter**: Spotless with Google Java Format 1.28.0 (Spotless requires Java 17+ to run but the project targets Java 8 bytecode) +- **Formatter**: Spotless with Google Java Format 1.28.0 (the project targets Java 17 bytecode) - **Checkstyle**: Google style variant in root `checkstyle.xml`, 100 char line limit - **Import order**: `org.apache.tsfile`, `javax`, `java`, static imports diff --git a/java/examples/pom.xml b/java/examples/pom.xml index 478676b46..075a70e52 100644 --- a/java/examples/pom.xml +++ b/java/examples/pom.xml @@ -46,8 +46,7 @@ org.apache.maven.plugins maven-compiler-plugin - 8 - 8 + 17 diff --git a/java/pom.xml b/java/pom.xml index 65390c6ba..ce0105aa6 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -61,13 +61,12 @@ org.slf4j slf4j-api - 2.0.16 + 2.0.17 org.antlr antlr4-runtime - - 4.9.3 + 4.13.2 junit @@ -83,8 +82,7 @@ ch.qos.logback logback-classic - - 1.3.16 + 1.5.32 commons-cli @@ -94,7 +92,6 @@ org.apache.parquet parquet-hadoop - 1.14.4 diff --git a/java/tools/README-zh.md b/java/tools/README-zh.md index d19990065..46c615ed0 100644 --- a/java/tools/README-zh.md +++ b/java/tools/README-zh.md @@ -29,7 +29,7 @@ 构建 Java 版的 TsFile Tools,必须要安装以下依赖: -1. Java >= 1.8 (1.8, 11 到 17 都经过验证. 请确保设置了环境变量). +1. Java >= 17. 请确保设置了环境变量. 2. Maven >= 3.6 (如果要从源代码编译TsFile). @@ -229,4 +229,3 @@ arrow2tsfile.bat --source .\data\arrow --target .\output --fail_dir .\failed - 多批次:`{源文件名}_1.tsfile`、`{源文件名}_2.tsfile`、... - 表名与输出文件名相互独立——表名来自 schema 或 `--table_name`,文件名来自源文件。 - diff --git a/java/tools/README.md b/java/tools/README.md index 96b86889c..ad1f40215 100644 --- a/java/tools/README.md +++ b/java/tools/README.md @@ -29,7 +29,7 @@ To build the Java version of TsFile Tools, you must have the following dependencies installed: -1. Java >= 1.8 (1.8, 11 to 17 are verified. Make sure the environment variable is set). +1. Java >= 17. Make sure the environment variable is set. 2. Maven >= 3.6 (if you are compiling TsFile from source). ### Build with Maven diff --git a/java/tsfile/README-zh.md b/java/tsfile/README-zh.md index 286befe52..c470828a8 100644 --- a/java/tsfile/README-zh.md +++ b/java/tsfile/README-zh.md @@ -147,7 +147,7 @@ 构建 Java 版的 TsFile,必须要安装以下依赖: -1. Java >= 1.8 (1.8, 11 到 17 都经过验证. 请确保设置了环境变量). +1. Java >= 17. 请确保设置了环境变量. 2. Maven >= 3.6.3 (如果要从源代码编译TsFile). diff --git a/java/tsfile/README.md b/java/tsfile/README.md index b8c23d784..ec896ca27 100644 --- a/java/tsfile/README.md +++ b/java/tsfile/README.md @@ -149,7 +149,7 @@ Read TsFile Example To build TsFile with Java, you need to have: -1. Java >= 1.8 (1.8, 11 to 17 are verified. Please make sure the environment path has been set accordingly). +1. Java >= 17. Please make sure the environment path has been set accordingly. 2. Maven >= 3.6.3 (If you want to compile TsFile from source code). diff --git a/pom.xml b/pom.xml index ff9bcb1b8..eb9380fb9 100644 --- a/pom.xml +++ b/pom.xml @@ -32,8 +32,9 @@ pom Apache TsFile Project Parent POM - 1.8 - 1.8 + 17 + 17 + 17 false 3.30.2-b1 @@ -194,7 +195,7 @@ org.antlr antlr4-maven-plugin - 4.9.3 + 4.13.2 org.codehaus.mojo @@ -229,7 +230,7 @@ @@ -289,16 +290,16 @@ true - + - enforce-java8-compatability + enforce-java17-compatibility enforce - 1.8 + 17 @@ -315,7 +316,7 @@ true - 1.8.0 + [17,) @@ -616,15 +617,13 @@ - .java-9-and-above + .java-17-and-above - [9,) + [17,) - - 8 - - .java-17-below - - (,17) - - - - 2.27.1 - - true - - .os-linux-x86_64 From 7bda5ee9bcf882afbdab46e84f5a579462191f04 Mon Sep 17 00:00:00 2001 From: HTHou Date: Fri, 5 Jun 2026 18:21:14 +0800 Subject: [PATCH 2/2] Address Dependabot Maven alerts --- java/pom.xml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/java/pom.xml b/java/pom.xml index ce0105aa6..3106d99bb 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -97,12 +97,12 @@ org.apache.hadoop hadoop-common - 3.3.6 + 3.4.2 org.apache.hadoop hadoop-mapreduce-client-core - 3.3.6 + 3.4.2 org.apache.arrow @@ -128,7 +128,7 @@ com.google.guava guava - 27.0-jre + 33.5.0-jre commons-logging @@ -138,22 +138,32 @@ org.apache.commons commons-compress - 1.21 + 1.28.0 + + + org.apache.commons + commons-lang3 + 3.18.0 + + + commons-io + commons-io + 2.20.0 com.fasterxml.jackson.core jackson-databind - 2.17.0 + 2.18.6 com.fasterxml.jackson.core jackson-core - 2.17.0 + 2.18.6 com.fasterxml.jackson.core jackson-annotations - 2.17.0 + 2.18.6 org.apache.commons