Hello Marton Greber, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24293
to look at the new patch set (#4).
Change subject: [java] Add JDK25 support
......................................................................
[java] Add JDK25 support
Add support for building and running the Java modules on JDK25 while
preserving JDK17 compatibility.
* FakeDNS: rework the test DNS override to also drive the JDK25
java.net.spi.InetAddressResolver SPI (lookupByName / lookupByAddress),
falling back to the Java 9+ InetAddress$NameService path and the
Java 8 sun.net.spi.nameservice.NameService path. The existing
--add-opens=java.base/java.net in gradle/tests.gradle already covers
the reflective field access on all of these paths. The Java 9+ path
catches only the expected ReflectiveOperationException /
InaccessibleObjectException so genuine programming errors surface
instead of being treated as "try the next JDK path".
* Spark KuduContext: obtain the login/current user via Hadoop's
UserGroupInformation (loginUserFromKeytabAndReturnUGI when a principal
and keytab are configured, otherwise getCurrentUser) and run the
authentication-credentials export via UGI.doAs. This replaces the
previous javax.security.auth.Subject.getSubject()/Subject.doAs() and
manual LoginContext usage, which are disabled/deprecated on newer JDKs,
and does so without reflecting into JDK internals -- UGI encapsulates
the JDK17-vs-JDK18+ differences in how the current Subject is obtained.
* Bump Hadoop to 3.4.3 for its newer JAAS/Subject compatibility fixes:
3.4.x obtains the current Subject via Subject.current() on JDK18+,
whereas 3.4.1 still calls the JDK18+-removed Subject.getSubject().
Spark 3.5.x bundles an older hadoop-client (3.3.x), so force the
hadoop-client-api / hadoop-client-runtime artifacts to the project
Hadoop version wherever Spark is on the classpath: kudu-spark and
kudu-spark-tools via the root build.gradle resolutionStrategy, and
kudu-backup (which excludes hadoop-common and would otherwise ride
Spark's older client) via its own resolutionStrategy. Without this,
SparkContext initialization fails on JDK17+ with
"UnsupportedOperationException: getSubject is not supported".
* Negotiator: when Kerberos negotiation fails, unwrap the SaslException
from both the legacy Subject.doAs wrapping (RuntimeException ->
PrivilegedActionException) and the modern Subject.callAs wrapping
(CompletionException) used by the SecurityManagerCompatibility shim on
JDK18+. Previously only the legacy wrapping was handled, so on JDK18+
an authentication failure escaped as an unexpected (recoverable)
exception and was retried until timeout instead of surfacing as a
clean NonRecoverableException.
* hadoop-common 3.4.2+ dropped the old commons-collections 3.x in favor
of commons-collections4, but Ranger's RangerPluginConfig still uses
org.apache.commons.collections.CollectionUtils. Declare
commons-collections 3.2.2 explicitly for kudu-subprocess so the Ranger
subprocess handler and its tests keep resolving that class.
* Skip the Hive Metastore integration test on JDK23+ (not yet
compatible). For the TestSecurity non-default-principal check, match a
broad set of authentication-related keywords instead of exact error
text (which varies across JDK/Kerberos implementations), so the test
still fails if the connection is rejected for an unrelated reason.
Change-Id: I9d3835c9289ac9817c39a86b7be22a28818c5bb0
---
M java/build.gradle
M java/gradle/dependencies.gradle
M java/kudu-backup/build.gradle
M java/kudu-client/src/main/java/org/apache/kudu/client/Negotiator.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestSecurity.java
M java/kudu-spark/src/main/scala/org/apache/kudu/spark/kudu/KuduContext.scala
M java/kudu-subprocess/build.gradle
M java/kudu-test-utils/src/main/java/org/apache/kudu/test/cluster/FakeDNS.java
M
java/kudu-test-utils/src/test/java/org/apache/kudu/test/TestMiniKuduCluster.java
9 files changed, 204 insertions(+), 91 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/93/24293/4
--
To view, visit http://gerrit.cloudera.org:8080/24293
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9d3835c9289ac9817c39a86b7be22a28818c5bb0
Gerrit-Change-Number: 24293
Gerrit-PatchSet: 4
Gerrit-Owner: Zoltan Chovan <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>