Skip to content

[AMORO-3853] Support Java 17 build for Amoro#4244

Open
xxubai wants to merge 8 commits into
apache:masterfrom
xxubai:java17-experimental
Open

[AMORO-3853] Support Java 17 build for Amoro#4244
xxubai wants to merge 8 commits into
apache:masterfrom
xxubai:java17-experimental

Conversation

@xxubai
Copy link
Copy Markdown
Contributor

@xxubai xxubai commented Jun 8, 2026

Why are the changes needed?

Close #3853.

Amoro currently cannot reliably build and validate under JDK 17 beyond the Trino-specific path. Some build configuration still assumes older JDK behavior, and the mixed Flink module uses reflective access or non-public Flink/Iceberg internals that are fragile under the Java module system.

This PR adds experimental JDK 17 build support while keeping JDK 11 as the baseline, and updates CI to validate both JDK versions.

Brief change log

  • Add a java17 Maven profile with the required compiler, surefire, and javadoc module opens/exports.
  • Update dependency/build settings for JDK 17 compatibility, including cglib, slf4j, surefire configuration, Hudi compiler inheritance, Paimon surefire setup, and Trino toolchain matching.
  • Extend core Hadoop 2 and Hadoop 3 CI matrices to run with both JDK 11 and JDK 17.
  • Refactor mixed Flink read/write paths to avoid unsafe reflection and non-public API usage:
    • add KerberosAwareInputFormat;
    • replace Iceberg StreamingReaderOperator dependency with UnkeyedStreamingReaderOperator;
    • remove FlinkClassReflectionUtil;
    • build FlinkInputFormat directly from public table metadata;
    • use public Flink accessors where available.
  • Preserve Flink table properties for mixed keyed/unkeyed tables without relying on JDK proxy behavior for non-Hive tables.
  • Stabilize mixed Flink tests for JDK 17 by avoiding asynchronous watermark waits, using deterministic truncated LocalDateTime, and adapting writer assertions to WriteResult.
  • Update README to document JDK 11 and experimental JDK 17 build support.

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

    Existing mixed Flink tests were adjusted to cover the updated JDK 17-compatible read/write paths.

  • Add screenshots for manual tests if appropriate

    Not applicable.

  • Run test locally before making a pull request

    ./mvnw validate passed locally with Temurin JDK 17.0.17.

Documentation

  • Does this pull request introduce a new feature? (yes / no)

    yes

  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

    README

@github-actions github-actions Bot added type:docs Improvements or additions to documentation module:mixed-flink Flink moduel for Mixed Format module:mixed-trino trino module for Mixed Format type:infra type:build module:common labels Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:mixed-flink Flink moduel for Mixed Format module:mixed-trino trino module for Mixed Format type:build type:docs Improvements or additions to documentation type:infra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement]: Support to build amoro on java 17

1 participant