Skip to content

Conversation

slfan1989
Copy link
Contributor

@slfan1989 slfan1989 commented Oct 12, 2025

Description of PR

JIRA: HADOOP-19725. [JDK17] Upgrade SpotBugs Version to Support JDK 17 Compilation.

The error in sputbug is currently caused by incompatibility with JDK 17.

[java]   Error scanning org/apache/hadoop/yarn/proto/YarnServerResourceManagerRecoveryProtos$ApplicationStateDataProto$Builder for referenced classes
     [java]     java.lang.IllegalArgumentException: Unsupported class file major version 61
     [java]       At org.objectweb.asm.ClassReader.<init>(ClassReader.java:189)
     [java]       At org.objectweb.asm.ClassReader.<init>(ClassReader.java:170)
     [java]       At org.objectweb.asm.ClassReader.<init>(ClassReader.java:156)
     [java]       At edu.umd.cs.findbugs.asm.FBClassReader.<init>(FBClassReader.java:35)
     [java]       At edu.umd.cs.findbugs.classfile.engine.asm.ClassReaderAnalysisEngine.analyze(ClassReaderAnalysisEngine.java:48)
     [java]       At edu.umd.cs.findbugs.classfile.engine.asm.ClassReaderAnalysisEngine.analyze(ClassReaderAnalysisEngine.java:34)
     [java]       At edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getClassAnalysis(AnalysisCache.java:261)
     [java]       At edu.umd.cs.findbugs.classfile.engine.ClassInfoAnalysisEngine.analyze(ClassInfoAnalysisEngine.java:75)
     [java]       At edu.umd.cs.findbugs.classfile.engine.ClassInfoAnalysisEngine.analyze(ClassInfoAnalysisEngine.java:38)
     [java]       At edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getClassAnalysis(AnalysisCache.java:261)
     [java]       At edu.umd.cs.findbugs.FindBugs2.buildReferencedClassSet(FindBugs2.java:806)
     [java]       At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:249)
     [java]       At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:395)
     [java]       At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1231)

We upgraded spotbugs.version from 4.2.2 to 4.8.3, and spotbugs-maven-plugin.version from 4.2.0 to 4.7.3.6.

How was this patch tested?

CI.

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?

Copy link
Contributor

@zhtttylz zhtttylz left a comment

Choose a reason for hiding this comment

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

+1,LGTM @slfan1989

@slfan1989
Copy link
Contributor Author

@cnauroth @szetszwo After upgrading to JDK 17, I found that spotbug could not run properly because the current version does not support JDK 17. To resolve this issue, I upgraded the versions of the two related plugins. The changes have been tested locally, and the results are as expected.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 14m 35s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 36m 49s trunk passed
+1 💚 compile 15m 58s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 compile 15m 44s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
-1 ❌ mvnsite 9m 55s /branch-mvnsite-root.txt root in trunk failed.
+1 💚 javadoc 9m 22s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 javadoc 8m 51s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 shadedclient 124m 16s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 28m 30s the patch passed
+1 💚 compile 15m 17s the patch passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 javac 15m 17s the patch passed
+1 💚 compile 15m 43s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javac 15m 43s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-1 ❌ mvnsite 7m 2s /patch-mvnsite-root.txt root in the patch failed.
+1 💚 javadoc 9m 7s the patch passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 javadoc 8m 45s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 shadedclient 53m 32s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 853m 28s /patch-unit-root.txt root in the patch passed.
+1 💚 asflicense 1m 44s The patch does not generate ASF License warnings.
1109m 31s
Reason Tests
Failed junit tests hadoop.hdfs.tools.TestDFSAdmin
hadoop.yarn.sls.appmaster.TestAMSimulator
hadoop.yarn.server.router.webapp.TestFederationWebApp
hadoop.yarn.server.router.subcluster.fair.TestYarnFederationWithFairScheduler
hadoop.yarn.server.router.webapp.TestRouterWebServicesREST
hadoop.yarn.server.nodemanager.containermanager.logaggregation.TestLogAggregationService
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8028/1/artifact/out/Dockerfile
GITHUB PR #8028
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint
uname Linux da08cd8994df 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 3b47bd1
Default Java Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
Multi-JDK versions /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8028/1/testReport/
Max. process+thread count 3529 (vs. ulimit of 5500)
modules C: . U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8028/1/console
versions git=2.25.1 maven=3.9.11
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants