xxubai opened a new pull request, #4244:
URL: https://github.com/apache/amoro/pull/4244
## 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?
- [x] 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.
- [x] 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]