hadoop icon indicating copy to clipboard operation
hadoop copied to clipboard

HADOOP-19212. Avoid Subject.getSubject method on newer JVMs

Open jbrinegar opened this issue 1 year ago • 13 comments

In Java 23, Subject.getSubject requires setting the system property java.security.manager to allow, else it will throw an exception. More detail is available in the release notes: https://jdk.java.net/23/release-notes

This is in support of the eventual removal of the security manager, at which point, Subject.getSubject will be removed. Since this project supports older Java releases, and the API which one must migrate to was only introduced in Java 18, I hid the implementations behind a runtime version check. I verified against several local Java versions that the correct classes are loaded (and more importantly, that the incorrect classes are not loaded). The outright removal of the security manager, and by extension the Subject.getSubject method would be a particularly large problem if we do not address this, which was my motivation here.

Some manual testing on Java 11, 17, and 23:

» java --version
openjdk 11.0.23 2024-04-16 LTS
» java -cp hadoop-auth-3.5.0-SNAPSHOT.jar org.apache.hadoop.util.subject.SubjectAdapter
Current subject is null

» java --version
openjdk 17.0.5 2022-10-18 LTS
» java -cp hadoop-auth-3.5.0-SNAPSHOT.jar org.apache.hadoop.util.subject.SubjectAdapter
Current subject is null

» java --version
openjdk 23 2024-09-17
» java -cp hadoop-auth-3.5.0-SNAPSHOT.jar org.apache.hadoop.util.subject.SubjectAdapter
Current subject is null

As desired, the class containing the old implementation does not get loaded on a new JVM:

» java --version
openjdk 23 2024-09-17
» java -verbose:class -cp hadoop-auth-3.5.0-SNAPSHOT.jar org.apache.hadoop.util.subject.SubjectAdapter | \grep -i subject | grep "class,load" | awk '{print $2}'
org.apache.hadoop.util.subject.SubjectAdapter
org.apache.hadoop.util.subject.HiddenGetSubject
javax.security.auth.Subject
org.apache.hadoop.util.subject.GetSubjectNg

And the inverse is true for an older JVM:

» java --version
openjdk 17.0.5 2022-10-18 LTS
» java -verbose:class -cp hadoop-auth-3.5.0-SNAPSHOT.jar org.apache.hadoop.util.subject.SubjectAdapter | \grep -i subject | grep "class,load" | awk '{print $2}'
org.apache.hadoop.util.subject.SubjectAdapter
org.apache.hadoop.util.subject.HiddenGetSubject
javax.security.auth.Subject
org.apache.hadoop.util.subject.ClassicGetSubject
javax.security.auth.Subject$1

Description of PR

How was this patch tested?

For code changes:

  • [ ] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • [ ] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • [ ] If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

jbrinegar avatar Sep 30 '24 15:09 jbrinegar

:confetti_ball: +1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 0m 48s Docker mode activated.
_ Prechecks _
+1 :green_heart: dupname 0m 0s No case conflicting files found.
+0 :ok: codespell 0m 0s codespell was not available.
+0 :ok: detsecrets 0m 0s detect-secrets was not available.
+1 :green_heart: @author 0m 0s The patch does not contain any @author tags.
+1 :green_heart: test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+0 :ok: mvndep 14m 56s Maven dependency ordering for branch
+1 :green_heart: mvninstall 37m 42s trunk passed
+1 :green_heart: compile 19m 49s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 :green_heart: compile 18m 16s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 :green_heart: checkstyle 1m 28s trunk passed
+1 :green_heart: mvnsite 2m 27s trunk passed
+1 :green_heart: javadoc 2m 3s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 :green_heart: javadoc 1m 34s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 :green_heart: spotbugs 3m 31s trunk passed
+1 :green_heart: shadedclient 41m 40s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 :ok: mvndep 0m 32s Maven dependency ordering for patch
+1 :green_heart: mvninstall 1m 19s the patch passed
+1 :green_heart: compile 18m 46s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 :green_heart: javac 18m 46s the patch passed
+1 :green_heart: compile 18m 16s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 :green_heart: javac 18m 16s the patch passed
+1 :green_heart: blanks 0m 0s The patch has no blanks issues.
-0 :warning: checkstyle 1m 23s /results-checkstyle-hadoop-common-project.txt hadoop-common-project: The patch generated 50 new + 73 unchanged - 0 fixed = 123 total (was 73)
+1 :green_heart: mvnsite 2m 28s the patch passed
+1 :green_heart: javadoc 1m 55s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 :green_heart: javadoc 1m 33s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 :green_heart: spotbugs 3m 52s the patch passed
+1 :green_heart: shadedclient 42m 46s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 :green_heart: unit 3m 27s hadoop-auth in the patch passed.
+1 :green_heart: unit 19m 35s hadoop-common in the patch passed.
+1 :green_heart: asflicense 1m 4s The patch does not generate ASF License warnings.
262m 23s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7081/1/artifact/out/Dockerfile
GITHUB PR https://github.com/apache/hadoop/pull/7081
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 18e6ff302126 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 95412947080ed6b67b2d8a6fcc00618ffb8d9759
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7081/1/testReport/
Max. process+thread count 3134 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-auth hadoop-common-project/hadoop-common U: hadoop-common-project
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7081/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

hadoop-yetus avatar Sep 30 '24 19:09 hadoop-yetus

I am happy to report no other issues. This Subject usage in hadoop-common impacts a great many projects, so -Djava.security.manager=allow had to be sprinkled around to get things booting on Java 23.

jbrinegar avatar Sep 30 '24 20:09 jbrinegar

Ok sounds like we should get it backported to 3.4.x and 3.3.x too.

jojochuang avatar Oct 01 '24 00:10 jojochuang

@steveloughran PR for HADOOP-19212. I updated the title to reflect the duplicate change.

jbrinegar avatar Oct 02 '24 15:10 jbrinegar

@steveloughran thank you for the review. I have pushed a second commit that addresses feedback marked with 👍. The title of this PR was updated to include "HADOOP-19212." as a prefix. I am happy to rebase/squash once review is complete, if squashing is necessary.

Due to dependencies, I cannot use DynMethods and Shell, and so those requests are not completed. Let me know how you wish for me to proceed there.

jbrinegar avatar Oct 03 '24 00:10 jbrinegar

:confetti_ball: +1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 17m 46s Docker mode activated.
_ Prechecks _
+1 :green_heart: dupname 0m 0s No case conflicting files found.
+0 :ok: codespell 0m 1s codespell was not available.
+0 :ok: detsecrets 0m 1s detect-secrets was not available.
+1 :green_heart: @author 0m 0s The patch does not contain any @author tags.
+1 :green_heart: test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+0 :ok: mvndep 14m 59s Maven dependency ordering for branch
+1 :green_heart: mvninstall 37m 16s trunk passed
+1 :green_heart: compile 20m 6s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 :green_heart: compile 18m 50s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 :green_heart: checkstyle 1m 27s trunk passed
+1 :green_heart: mvnsite 2m 31s trunk passed
+1 :green_heart: javadoc 2m 3s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 :green_heart: javadoc 1m 34s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 :green_heart: spotbugs 3m 36s trunk passed
+1 :green_heart: shadedclient 48m 24s branch has no errors when building and testing our client artifacts.
-0 :warning: patch 48m 51s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+0 :ok: mvndep 0m 33s Maven dependency ordering for patch
+1 :green_heart: mvninstall 1m 19s the patch passed
+1 :green_heart: compile 19m 7s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 :green_heart: javac 19m 7s the patch passed
+1 :green_heart: compile 18m 12s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 :green_heart: javac 18m 12s the patch passed
+1 :green_heart: blanks 0m 0s The patch has no blanks issues.
-0 :warning: checkstyle 1m 22s /results-checkstyle-hadoop-common-project.txt hadoop-common-project: The patch generated 53 new + 73 unchanged - 0 fixed = 126 total (was 73)
+1 :green_heart: mvnsite 2m 27s the patch passed
+1 :green_heart: javadoc 1m 55s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 :green_heart: javadoc 1m 33s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 :green_heart: spotbugs 3m 54s the patch passed
+1 :green_heart: shadedclient 42m 43s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 :green_heart: unit 3m 28s hadoop-auth in the patch passed.
+1 :green_heart: unit 19m 32s hadoop-common in the patch passed.
+1 :green_heart: asflicense 1m 4s The patch does not generate ASF License warnings.
286m 44s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7081/2/artifact/out/Dockerfile
GITHUB PR https://github.com/apache/hadoop/pull/7081
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 37e27de92584 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / e25881ea56e78f238b9098021d9f8d5a3e98d1d4
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7081/2/testReport/
Max. process+thread count 3134 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-auth hadoop-common-project/hadoop-common U: hadoop-common-project
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7081/2/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

hadoop-yetus avatar Oct 03 '24 05:10 hadoop-yetus

:confetti_ball: +1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 17m 35s Docker mode activated.
_ Prechecks _
+1 :green_heart: dupname 0m 0s No case conflicting files found.
+0 :ok: codespell 0m 0s codespell was not available.
+0 :ok: detsecrets 0m 0s detect-secrets was not available.
+1 :green_heart: @author 0m 0s The patch does not contain any @author tags.
+1 :green_heart: test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+0 :ok: mvndep 15m 11s Maven dependency ordering for branch
+1 :green_heart: mvninstall 36m 57s trunk passed
+1 :green_heart: compile 19m 59s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 :green_heart: compile 18m 16s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 :green_heart: checkstyle 1m 24s trunk passed
+1 :green_heart: mvnsite 2m 29s trunk passed
+1 :green_heart: javadoc 2m 5s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 :green_heart: javadoc 1m 33s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 :green_heart: spotbugs 3m 36s trunk passed
+1 :green_heart: shadedclient 41m 55s branch has no errors when building and testing our client artifacts.
-0 :warning: patch 42m 23s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+0 :ok: mvndep 0m 33s Maven dependency ordering for patch
+1 :green_heart: mvninstall 1m 19s the patch passed
+1 :green_heart: compile 19m 5s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 :green_heart: javac 19m 5s the patch passed
+1 :green_heart: compile 18m 8s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 :green_heart: javac 18m 8s the patch passed
+1 :green_heart: blanks 0m 0s The patch has no blanks issues.
-0 :warning: checkstyle 1m 23s /results-checkstyle-hadoop-common-project.txt hadoop-common-project: The patch generated 53 new + 73 unchanged - 0 fixed = 126 total (was 73)
+1 :green_heart: mvnsite 2m 26s the patch passed
+1 :green_heart: javadoc 1m 57s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 :green_heart: javadoc 1m 34s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 :green_heart: spotbugs 3m 50s the patch passed
+1 :green_heart: shadedclient 42m 24s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 :green_heart: unit 3m 29s hadoop-auth in the patch passed.
+1 :green_heart: unit 19m 37s hadoop-common in the patch passed.
+1 :green_heart: asflicense 1m 4s The patch does not generate ASF License warnings.
278m 55s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7081/3/artifact/out/Dockerfile
GITHUB PR https://github.com/apache/hadoop/pull/7081
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 9fc8ff5d88eb 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / e6e9bd2a2711f45618551ecb216103d1b0444164
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7081/3/testReport/
Max. process+thread count 1294 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-auth hadoop-common-project/hadoop-common U: hadoop-common-project
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7081/3/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

hadoop-yetus avatar Oct 07 '24 20:10 hadoop-yetus

JEP 486: Permanently Disable the Security Manager is on the JDK's technical roadmap. As part of the changes (PR in review) will be for Subject.current to throw unconditionally, meaning the workaround to allow a SecurityManager will no longer work. So the timing of the PR here is good.

AlanBateman avatar Oct 16 '24 07:10 AlanBateman

:broken_heart: -1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 38m 36s Docker mode activated.
_ Prechecks _
+1 :green_heart: dupname 0m 0s No case conflicting files found.
+0 :ok: codespell 0m 0s codespell was not available.
+0 :ok: detsecrets 0m 0s detect-secrets was not available.
+1 :green_heart: @author 0m 0s The patch does not contain any @author tags.
+1 :green_heart: test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+0 :ok: mvndep 16m 22s Maven dependency ordering for branch
-1 :x: mvninstall 5m 38s /branch-mvninstall-root.txt root in trunk failed.
+1 :green_heart: compile 36m 52s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
-1 :x: compile 9m 6s /branch-compile-root-jdkPrivateBuild-1.8.0_422-8u422-b05-1~20.04-b05.txt root in trunk failed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05.
+1 :green_heart: checkstyle 1m 58s trunk passed
+1 :green_heart: mvnsite 3m 45s trunk passed
+1 :green_heart: javadoc 3m 7s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 :green_heart: javadoc 2m 14s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 :green_heart: spotbugs 4m 52s trunk passed
+1 :green_heart: shadedclient 47m 24s branch has no errors when building and testing our client artifacts.
-0 :warning: patch 47m 51s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+0 :ok: mvndep 0m 33s Maven dependency ordering for patch
+1 :green_heart: mvninstall 1m 20s the patch passed
+1 :green_heart: compile 19m 36s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 :green_heart: javac 19m 36s the patch passed
+1 :green_heart: compile 17m 59s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 :green_heart: javac 17m 59s the patch passed
+1 :green_heart: blanks 0m 0s The patch has no blanks issues.
-0 :warning: checkstyle 1m 26s /results-checkstyle-hadoop-common-project.txt hadoop-common-project: The patch generated 46 new + 73 unchanged - 0 fixed = 119 total (was 73)
+1 :green_heart: mvnsite 2m 26s the patch passed
+1 :green_heart: javadoc 1m 56s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 :green_heart: javadoc 1m 35s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 :green_heart: spotbugs 3m 56s the patch passed
+1 :green_heart: shadedclient 42m 48s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 :green_heart: unit 3m 29s hadoop-auth in the patch passed.
+1 :green_heart: unit 19m 35s hadoop-common in the patch passed.
+1 :green_heart: asflicense 1m 4s The patch does not generate ASF License warnings.
288m 31s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7081/4/artifact/out/Dockerfile
GITHUB PR https://github.com/apache/hadoop/pull/7081
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux d3c644186516 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 4325f46eeb78b186d4cb29641b974212cd35ff25
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7081/4/testReport/
Max. process+thread count 3098 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-auth hadoop-common-project/hadoop-common U: hadoop-common-project
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7081/4/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

hadoop-yetus avatar Oct 16 '24 20:10 hadoop-yetus

I am not sure I have the permissions to retrigger the failing checks. Ultimate failure was on the remote side:

[WARNING] c++: fatal error: cannot execute ‘as’: vfork: Resource temporarily unavailable
[WARNING] compilation terminated.
[WARNING] make[2]: *** [main/native/libhdfspp/tests/CMakeFiles/user_lock_test.dir/build.make:63: main/native/libhdfspp/tests/CMakeFiles/user_lock_test.dir/user_lock_test.cc.o] Error 1

This java code compiles just fine:

[INFO] Reactor Summary for Apache Hadoop Common Project 3.5.0-SNAPSHOT:
[INFO]
[INFO] Apache Hadoop Annotations .......................... SUCCESS [  0.710 s]
[INFO] Apache Hadoop MiniKDC .............................. SUCCESS [  0.271 s]
[INFO] Apache Hadoop Auth ................................. SUCCESS [  0.769 s]
[INFO] Apache Hadoop Auth Examples ........................ SUCCESS [  0.094 s]
[INFO] Apache Hadoop Common ............................... SUCCESS [ 36.642 s]
[INFO] Apache Hadoop NFS .................................. SUCCESS [  7.181 s]
[INFO] Apache Hadoop KMS .................................. SUCCESS [  0.227 s]
[INFO] Apache Hadoop Registry ............................. SUCCESS [  0.439 s]
[INFO] Apache Hadoop Common Project ....................... SUCCESS [  0.018 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  46.854 s
[INFO] Finished at: 2024-10-16T16:54:14-04:00
[INFO] ------------------------------------------------------------------------

jbrinegar avatar Oct 16 '24 21:10 jbrinegar

Thank you for working on this patch @jbrinegar! This will help eliminate a big blocker for us in trying to upgrade our stack to JDK 23.

ryantomlinson95 avatar Feb 04 '25 21:02 ryantomlinson95

@ryantomlinson95 @cnauroth @steveloughran @jbrinegar @jojochuang @pan3793

I'd like to bring to your attention HADOOP-19486, and the corresponding thread I have opened on [email protected] , where I track my full JDK23 support work.

Please check my email, and join the discussion.

stoty avatar Mar 13 '25 10:03 stoty

My alternate patch tries the new API first, and falls back to the old one, @steveloughran . I have pinged you on that one, so that you can check it out, and maybe discuss it there.

Conversion either way has an overhead, as the Callable / PrivilegedExceptionAction conversion and exception re-wrapping has to happen, but IMO anything we do inside those doAs() blocks is heavyweight enough that the overhad is relatively negligible.

stoty avatar Mar 18 '25 15:03 stoty

We're closing this stale PR because it has been open for 100 days with no activity. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. If you feel like this was a mistake, or you would like to continue working on it, please feel free to re-open it and ask for a committer to remove the stale tag and review again. Thanks all for your contribution.

github-actions[bot] avatar Sep 20 '25 00:09 github-actions[bot]