Skip to content

JDK 25 compatibility: Parquet tests fail with Subject.getSubject() UnsupportedOperationException #4045

@xerial

Description

@xerial

Problem

Parquet tests fail when running on JDK 25 due to Hadoop's dependency on the deprecated Subject.getSubject() method, which has been removed in JDK 25.

Error Details

java.lang.UnsupportedOperationException: getSubject is not supported
	at java.base/javax.security.auth.Subject.getSubject(Subject.java:277)
	at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:588)
	at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:3888)
	at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:3878)
	at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:3666)
	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:557)
	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:289)
	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:541)
	at org.apache.hadoop.fs.Path.getFileSystem(Path.java:366)
	at org.apache.parquet.hadoop.util.HadoopOutputFile.fromPath(HadoopOutputFile.java:58)
	at wvlet.airframe.parquet.ParquetWriterAdapter$.builder(ParquetWriterAdapter.scala:36)

Root Cause

JDK 25 has removed the deprecated javax.security.auth.Subject.getSubject() method as part of the Security Manager removal (JEP 486). Hadoop's UserGroupInformation.getCurrentUser() relies on this method, causing all Parquet operations to fail.

Environment

  • JDK Version: 25
  • Hadoop Version: 3.4.2 (via parquet-hadoop dependency)
  • Parquet Version: 1.16.0
  • Affected Tests: All parquet module tests

Current Status

  • ✅ Fixed Security Manager compatibility issue (-Djava.security.manager=allow now only applied to JDK 17-23)
  • ❌ Subject.getSubject() incompatibility prevents parquet tests from running on JDK 25

Impact

  • CI tests with JDK 25 fail for any project using the parquet module
  • Users cannot use Airframe's parquet functionality with JDK 25

Possible Solutions

  1. Short-term: Document JDK 25 incompatibility and recommend JDK 21/23 for parquet usage
  2. Medium-term: Wait for Hadoop ecosystem to release JDK 25 compatible versions
  3. Long-term: Consider alternative parquet libraries that don't depend on Hadoop's security framework

Related Issues

This is a broader ecosystem issue affecting:

  • Apache Hadoop (needs to migrate away from deprecated Subject APIs)
  • Apache Parquet (depends on Hadoop for filesystem operations)
  • Any project using Hadoop/Parquet with JDK 25

Upstream tracking:

Reproduce

export JAVA_HOME=`/usr/libexec/java_home -v "25"`
./sbt "parquet/test"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions