Skip to content

Bump minimum Java version to 17 and remove pre-17 workarounds - #3579

Merged
Fokko merged 1 commit into
apache:masterfrom
iemejia:java17-extras
Aug 11, 2026
Merged

Bump minimum Java version to 17 and remove pre-17 workarounds#3579
Fokko merged 1 commit into
apache:masterfrom
iemejia:java17-extras

Conversation

@iemejia

@iemejiaiemejia commented May 23, 2026

Copy link
Copy Markdown
Member

Summary

Raise the minimum build/runtime requirement to Java 17 and remove workarounds and tooling that are no longer needed. The Hadoop 3.4.x bump and the vectored-I/O buffer fix that previously lived here have been split out (the Hadoop upgrade will come via #3559).

Java 17 baseline

  • Set maven.compiler.release to 17 and add an enforcer rule requiring Java 17+ to build.
  • Remove the extraJavaTestArgs (--add-opens / -XX flags) that were needed to run the tests on newer JDKs from a Java 11 baseline.
  • Drop the per-module maven.compiler.release=17 override in parquet-encoding-vector; it is now the project-wide default.
  • Simplify the CleanUtil javadoc.
  • CI: build only on JDK 17 (drop the JDK 11 matrix entry) and stop exporting extraJavaTestArgs.
  • Update the README to state the Java 17 requirement.

Spotless upgrade (2.46.1 -> 3.8.0)

Spotless 2.46.1 calls com.sun.tools.javac.util.Log methods that were removed in JDK 25, causing NoSuchMethodError during formatting. Spotless 3.8.0 is compatible with JDK 25. The switch/case comment indentation changes are produced by the new formatter version.

Remove obsolete japicmp exclude for IndexIterator

The exclude worked around a false-positive source incompatibility reported by japicmp 0.23.1 on the synthetic/bridge methods of PrimitiveIterator.OfInt (#3388). japicmp was upgraded to 0.26.1 (#3592), which handles those methods correctly, so the workaround is no longer needed. Verified that japicmp:cmp (with breakBuildOnSourceIncompatibleModifications=true) passes with the exclude removed.

Split out (deferred to #3559)

The Hadoop 3.3.0 -> 3.4.3 bump and the related vectored-I/O ByteBuffer leak fix have been removed from this PR. The Java 17 build passes without them (vectored-I/O tests simply skip on Hadoop 3.3.x, with no buffer leaks), so they are not required here and are better handled alongside #3559.

Testing

  • Verified on JDK 17: full spotless:check, japicmp:cmp (with break-on-incompatible), and parquet-hadoop compile/tests all pass.
  • Verified the Java 17 build passes with Hadoop 3.3.0.

@iemejiaiemejia changed the title Upgrade Hadoop 3.3.0 -> 3.4.3, Spotless 2.46.1 -> 3.5.1, fix vectored I/O buffer leakBump minimum Java version to 17 and remove pre-17 workaroundsMay 23, 2026
Comment threadpom.xml Outdated
Comment threadpom.xml Outdated
<japicmp.version>0.25.7</japicmp.version>
<javax.annotation.version>1.3.2</javax.annotation.version>
<spotless.version>2.46.1</spotless.version>
<spotless.version>3.5.1</spotless.version>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<spotless.version>3.5.1</spotless.version>
<spotless.version>3.8.0</spotless.version>

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — bumped to 3.8.0 and ran spotless:apply (no formatting changes beyond the version bump). Thanks for the suggestion.

for (ConsecutivePartList consecutivePart : allParts) {
ParquetFileRange currRange = ranges.get(k++);
consecutivePart.readFromVectoredRange(currRange, builder);
// Use a capturing allocator to track all buffers allocated by Hadoop during vectored reads.

@nastranastraJul 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#3559 has an alternative approach for this.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed from this PR as well — it's only relevant once vectored I/O is actually exercised (Hadoop 3.4.x). Deferring to your approach in #3559.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍 I don't think we should add code to Parquet to patch open issues on Hadoop. Just cleaned up the PR, I think it is good to go now.

@iemejia
iemejiaforce-pushed the java17-extras branch 3 times, most recently from 16ddc39 to 530f1eaCompareJuly 14, 2026 21:44

@kevinjqliukevinjqliu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Looks like we can split out some some changes in other PRs, that would be helpful for reviews. I think we should keep this PR as light as possible and only deals changes required for java 17. Anything else we can either split into separate PR and merge first, or drop as a follow up

Comment threadpom.xml Outdated
<excludes>
<exclude>${shade.prefix}</exclude>
<!-- JDK 11 adds interface methods/bridges on PrimitiveIterator.OfInt; ignore japicmp source incompatibility -->
<!-- JDK adds interface methods/bridges on PrimitiveIterator.OfInt; ignore japicmp source incompatibility -->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this comment still correct without the 11? or is it a java 11 specific comment?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question — I dug into it. It turned out not to be JDK-11-specific behavior at all: the exclude was a workaround for a false-positive source incompatibility that japicmp 0.23.1 reported on the synthetic/bridge methods of PrimitiveIterator.OfInt (added in #3388). japicmp was upgraded to 0.26.1 in #3592 (already on master), which handles those methods correctly. I verified that japicmp:cmp (with breakBuildOnSourceIncompatibleModifications=true) passes with the exclude removed, so I removed the exclude and the comment entirely rather than reword it.

Raise the minimum build/runtime requirement to Java 17 and clean up
workarounds and tooling that are no longer needed.
Java 17 baseline:
- Set maven.compiler.release to 17 and add an enforcer rule that
requires Java 17+ to build.
- Remove the extraJavaTestArgs (--add-opens / -XX flags) that were
needed to run the tests on newer JDKs from a Java 11 baseline.
- Drop the per-module maven.compiler.release=17 override in
parquet-encoding-vector; it is now the project-wide default.
- Simplify the CleanUtil javadoc.
- CI: build only on JDK 17 (drop the JDK 11 matrix entry) and stop
exporting extraJavaTestArgs.
- Update README to state the Java 17 requirement.
Spotless upgrade (2.46.1 -> 3.8.0):
- Spotless 2.46.1 calls com.sun.tools.javac.util.Log methods that were
removed in JDK 25, causing NoSuchMethodError at format time. Spotless
3.8.0 is compatible with JDK 25. The switch/case comment indentation
changes are produced by the new formatter version.
Remove obsolete japicmp exclude for IndexIterator:
- The exclude worked around a false-positive source incompatibility
reported by japicmp 0.23.1 on the synthetic/bridge methods of
PrimitiveIterator.OfInt (apache#3388). japicmp was upgraded to 0.26.1
(apache#3592), which handles those methods correctly, so the workaround is
no longer needed. Verified that japicmp:cmp (with
breakBuildOnSourceIncompatibleModifications=true) passes with the
exclude removed.
Note: the Hadoop 3.3.0 -> 3.4.3 bump and the related vectored-I/O
ByteBuffer leak fix that previously lived here have been split out; the
Hadoop upgrade is tracked separately and will come via apache#3559.

@FokkoFokko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the discussion on the devlist, let's move this forward for 1.19.0

@Fokko
Fokko merged commit 2ea192a into apache:masterAug 11, 2026
4 checks passed
@iemejia

Copy link
Copy Markdown
MemberAuthor

YES !!! Thanks @Fokko !

Fokko pushed a commit that referenced this pull request Sep 4, 2026
pom.xml sets <maven.compiler.release>17</maven.compiler.release> (since
#3579, "Bump minimum Java version to 17"), but release-prepare-rc.yml
and release-publish.yml still set up JDK 11. The mismatch produces
"class file version 61.0 vs. 55.0" errors when the release build runs
under Java 11. Update both workflows to JDK 17 (setup-java step name
and java-version) so the runtime matches the compile target.
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@iemejia@nastra@Fokko@kevinjqliu