Skip to content

Conversation

K0K0V0K
Copy link
Contributor

@K0K0V0K K0K0V0K commented Oct 15, 2025

Description of PR

JIRA: YARN-11874
Title: ResourceManager REST API backward compatibility with Jersey1

Background

During the upgrade from Jersey1 to Jersey2, the YARN REST API message structure changed in the following ways:
• The javax.xml.bind.annotation.XmlType annotation is now generated as @xsi.type instead of type.
• JSON arrays with a single element are rendered as a single object rather than an array containing one object.
• Every XML root element is generated by default, whereas previously it was configurable.

These changes have caused compatibility issues:
• The YARN RM UI2 cannot load properly due to the changed API behavior.
• Some third-party systems that rely on the previous API behavior may break.

Solution

This PR reverts the API behavior to be compatible with Hadoop 3.4.2 (Jersey1) API documentation:
ResourceManager REST API (Hadoop 3.4.2)

Implementation Details
• It was not possible to configure jersey-media-json-jettison to behave like Jersey1.
• Introduced a new dependency: jersey-media-moxy to restore backward-compatible behavior.
• jersey-media-moxy can be configured via the following properties:
MarshallerProperties Documentation

Testing

•	Unit tests for ResourceManager were executed successfully to verify the patch.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 23s #8033 does not apply to trunk. Rebase required? Wrong Branch? See https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.
Subsystem Report/Notes
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/1/console
versions git=2.34.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 22s #8033 does not apply to trunk. Rebase required? Wrong Branch? See https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.
Subsystem Report/Notes
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/2/console
versions git=2.34.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 21s #8033 does not apply to trunk. Rebase required? Wrong Branch? See https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.
Subsystem Report/Notes
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/3/console
versions git=2.34.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 23s #8033 does not apply to trunk. Rebase required? Wrong Branch? See https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.
Subsystem Report/Notes
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/4/console
versions git=2.34.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@slfan1989
Copy link
Contributor

@K0K0V0K Thank you for bringing this issue to our attention. I will assist in completing the upgrade for YARN-11874.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 22s #8033 does not apply to trunk. Rebase required? Wrong Branch? See https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.
Subsystem Report/Notes
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/5/console
versions git=2.34.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@slfan1989
Copy link
Contributor

Since Yetus cannot handle very large PRs, we need to temporarily replace it with Ayush’s branch during development. Once this PR is merged, we should revert this change.

8d636ce

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 24s #8033 does not apply to trunk. Rebase required? Wrong Branch? See https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.
Subsystem Report/Notes
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/6/console
versions git=2.34.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@K0K0V0K
Copy link
Contributor Author

K0K0V0K commented Oct 15, 2025

Hi @slfan1989 !

Huge thanks for the help!

Some update:

  • I know this PR still has many issue, specially the GSON calls in the tests
  • I created the PR to
    • identify possoble test failers
    • open discussion, cause if moxy can not be included as dependency -> this wont work

I tried to make jettison working but i was not able to find the right configs to reproduce the Jersey1 API behaviour.

@K0K0V0K K0K0V0K marked this pull request as draft October 15, 2025 14:57
@slfan1989
Copy link
Contributor

Hi @slfan1989 !

Huge thanks for the help!

Some update:

  • I know this PR still has many issue, specially the GSON calls in the tests
  • I created the PR to
    • identify possoble test failers
    • open discussion, cause if moxy can not be included as dependency -> this wont work

I tried to make jettison working but i was not able to find the right configs to reproduce the Jersey1 API behaviour.

@K0K0V0K Thank you for this PR! Let’s work together to find a solution to this issue.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 38s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 2s No case conflicting files found.
+0 🆗 codespell 0m 2s codespell was not available.
+0 🆗 detsecrets 0m 2s detect-secrets was not available.
+0 🆗 shelldocs 0m 2s Shelldocs was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+0 🆗 jsonlint 0m 0s jsonlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 81 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 11m 9s Maven dependency ordering for branch
+1 💚 mvninstall 43m 59s trunk passed
+1 💚 compile 16m 12s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 compile 14m 13s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 2m 57s trunk passed
+1 💚 mvnsite 2m 46s trunk passed
+1 💚 javadoc 2m 36s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 javadoc 2m 26s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+0 🆗 spotbugs 0m 46s branch/hadoop-project no spotbugs output file (spotbugsXml.xml)
+0 🆗 spotbugs 0m 44s branch/hadoop-client-modules/hadoop-client-minicluster no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 34m 42s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 43s Maven dependency ordering for patch
+1 💚 mvninstall 19m 54s the patch passed
+1 💚 compile 15m 1s the patch passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 javac 15m 1s the patch passed
+1 💚 compile 13m 57s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 13m 57s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 2m 53s /results-checkstyle-root.txt root: The patch generated 123 new + 137 unchanged - 2 fixed = 260 total (was 139)
+1 💚 mvnsite 2m 36s the patch passed
+1 💚 shellcheck 0m 0s No new issues.
-1 ❌ javadoc 1m 9s /results-javadoc-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04.txt hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04 with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04 generated 12 new + 5436 unchanged - 0 fixed = 5448 total (was 5436)
-1 ❌ javadoc 1m 3s /patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkPrivateBuild-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09.txt hadoop-yarn-server-resourcemanager in the patch failed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09.
+0 🆗 spotbugs 0m 41s hadoop-project has no data from spotbugs
+0 🆗 spotbugs 0m 44s hadoop-client-modules/hadoop-client-minicluster has no data from spotbugs
+1 💚 shadedclient 36m 28s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 40s hadoop-project in the patch passed.
-1 ❌ unit 114m 42s /patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt hadoop-yarn-server-resourcemanager in the patch failed.
+1 💚 unit 0m 41s hadoop-client-minicluster in the patch passed.
+1 💚 asflicense 1m 7s The patch does not generate ASF License warnings.
361m 51s
Reason Tests
Failed junit tests hadoop.yarn.server.resourcemanager.webapp.TestRMWebappAuthentication
hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesConfigurationMutation
hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesCapacitySchedDynamicConfig
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/7/artifact/out/Dockerfile
GITHUB PR #8033
Optional Tests dupname asflicense codespell detsecrets shellcheck shelldocs compile javac javadoc mvninstall mvnsite unit shadedclient xmllint spotbugs checkstyle jsonlint
uname Linux a920859c489a 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 / 9fb4582
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/7/testReport/
Max. process+thread count 940 (vs. ulimit of 5500)
modules C: hadoop-project hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-client-modules/hadoop-client-minicluster U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/7/console
versions git=2.25.1 maven=3.9.11 spotbugs=4.2.2 shellcheck=0.7.0
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 35s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 shelldocs 0m 1s Shelldocs was not available.
+0 🆗 xmllint 0m 1s xmllint was not available.
+0 🆗 jsonlint 0m 1s jsonlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 83 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 8m 43s Maven dependency ordering for branch
+1 💚 mvninstall 27m 41s trunk passed
+1 💚 compile 15m 48s trunk passed
+1 💚 checkstyle 3m 17s trunk passed
+1 💚 mvnsite 2m 53s trunk passed
+1 💚 javadoc 2m 36s trunk passed
+0 🆗 spotbugs 0m 44s branch/hadoop-project no spotbugs output file (spotbugsXml.xml)
-1 ❌ spotbugs 1m 28s /branch-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt hadoop-yarn-server-resourcemanager in trunk failed.
+0 🆗 spotbugs 0m 42s branch/hadoop-client-modules/hadoop-client-minicluster no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 26m 55s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 35s Maven dependency ordering for patch
+1 💚 mvninstall 8m 55s the patch passed
+1 💚 compile 16m 18s the patch passed
+1 💚 javac 16m 18s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 3m 16s /results-checkstyle-root.txt root: The patch generated 120 new + 137 unchanged - 2 fixed = 257 total (was 139)
+1 💚 mvnsite 2m 51s the patch passed
+1 💚 shellcheck 0m 0s No new issues.
-1 ❌ javadoc 1m 10s /results-javadoc-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager generated 12 new + 5436 unchanged - 0 fixed = 5448 total (was 5436)
+0 🆗 spotbugs 0m 43s hadoop-project has no data from spotbugs
-1 ❌ spotbugs 1m 27s /patch-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt hadoop-yarn-server-resourcemanager in the patch failed.
+0 🆗 spotbugs 0m 42s hadoop-client-modules/hadoop-client-minicluster has no data from spotbugs
+1 💚 shadedclient 27m 9s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 40s hadoop-project in the patch passed.
+1 💚 unit 105m 6s hadoop-yarn-server-resourcemanager in the patch passed.
+1 💚 unit 0m 41s hadoop-client-minicluster in the patch passed.
+1 💚 asflicense 1m 2s The patch does not generate ASF License warnings.
270m 30s
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/8/artifact/out/Dockerfile
GITHUB PR #8033
Optional Tests dupname asflicense codespell detsecrets shellcheck shelldocs compile javac javadoc mvninstall mvnsite unit shadedclient xmllint spotbugs checkstyle jsonlint
uname Linux 9a77af86cb70 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 / 932565e
Default Java Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/8/testReport/
Max. process+thread count 958 (vs. ulimit of 5500)
modules C: hadoop-project hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-client-modules/hadoop-client-minicluster U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/8/console
versions git=2.25.1 maven=3.9.11 shellcheck=0.7.0
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 39s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 2s No case conflicting files found.
+0 🆗 codespell 0m 2s codespell was not available.
+0 🆗 detsecrets 0m 2s detect-secrets was not available.
+0 🆗 shelldocs 0m 2s Shelldocs was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+0 🆗 jsonlint 0m 0s jsonlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 95 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 10m 19s Maven dependency ordering for branch
+1 💚 mvninstall 28m 47s trunk passed
+1 💚 compile 15m 21s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 compile 15m 34s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 checkstyle 3m 1s trunk passed
+1 💚 mvnsite 4m 0s trunk passed
+1 💚 javadoc 3m 44s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 javadoc 3m 36s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+0 🆗 spotbugs 0m 47s branch/hadoop-project no spotbugs output file (spotbugsXml.xml)
-1 ❌ spotbugs 2m 48s /branch-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common-warnings.html hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common in trunk has 1100 extant spotbugs warnings.
-1 ❌ spotbugs 3m 8s /branch-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-warnings.html hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager in trunk has 1298 extant spotbugs warnings.
+0 🆗 spotbugs 0m 42s branch/hadoop-client-modules/hadoop-client-minicluster no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 25m 57s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 39s Maven dependency ordering for patch
+1 💚 mvninstall 8m 17s the patch passed
+1 💚 compile 14m 33s the patch passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 javac 14m 33s the patch passed
+1 💚 compile 16m 23s the patch passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 javac 16m 23s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 3m 47s /results-checkstyle-root.txt root: The patch generated 70 new + 161 unchanged - 2 fixed = 231 total (was 163)
+1 💚 mvnsite 3m 49s the patch passed
+1 💚 shellcheck 0m 0s No new issues.
-1 ❌ javadoc 1m 8s /results-javadoc-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04.txt hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04 with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04 generated 13 new + 5634 unchanged - 0 fixed = 5647 total (was 5634)
-1 ❌ javadoc 1m 7s /results-javadoc-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04.txt hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04 with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04 generated 12 new + 5436 unchanged - 0 fixed = 5448 total (was 5436)
+0 🆗 spotbugs 0m 37s hadoop-project has no data from spotbugs
-1 ❌ spotbugs 3m 43s /new-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.html hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager generated 13 new + 1292 unchanged - 6 fixed = 1305 total (was 1298)
+0 🆗 spotbugs 0m 42s hadoop-client-modules/hadoop-client-minicluster has no data from spotbugs
+1 💚 shadedclient 31m 5s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 40s hadoop-project in the patch passed.
+1 💚 unit 5m 46s hadoop-yarn-common in the patch passed.
-1 ❌ unit 106m 28s /patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt hadoop-yarn-server-resourcemanager in the patch passed.
+1 💚 unit 0m 40s hadoop-client-minicluster in the patch passed.
+1 💚 asflicense 1m 2s The patch does not generate ASF License warnings.
335m 33s
Reason Tests
SpotBugs module:hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager
new org.apache.hadoop.yarn.server.resourcemanager.federation.FederationStateStoreHeartbeat(SubClusterId, FederationStateStore, ResourceScheduler, JAXBContextResolver) may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.rs At FederationStateStoreHeartbeat.java:may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.rs At FederationStateStoreHeartbeat.java:[line 65]
new org.apache.hadoop.yarn.server.resourcemanager.federation.FederationStateStoreHeartbeat(SubClusterId, FederationStateStore, ResourceScheduler, JAXBContextResolver) may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.stateStoreService At FederationStateStoreHeartbeat.java:may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.stateStoreService At FederationStateStoreHeartbeat.java:[line 63]
new org.apache.hadoop.yarn.server.resourcemanager.federation.FederationStateStoreHeartbeat(SubClusterId, FederationStateStore, ResourceScheduler, JAXBContextResolver) may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.subClusterId At FederationStateStoreHeartbeat.java:may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.subClusterId At FederationStateStoreHeartbeat.java:[line 64]
Unknown bug pattern CT_CONSTRUCTOR_THROW in new org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver() At JAXBContextResolver.java:new org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver() At JAXBContextResolver.java:[line 47]
Unknown bug pattern CT_CONSTRUCTOR_THROW in new org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver(Configuration) At JAXBContextResolver.java:new org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver(Configuration) At JAXBContextResolver.java:[line 58]
org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo.getNodeLabelsInfo() may expose internal representation by returning NodeLabelsInfo.nodeLabelInfo At NodeLabelsInfo.java:by returning NodeLabelsInfo.nodeLabelInfo At NodeLabelsInfo.java:[line 67]
new org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo(ArrayList) may expose internal representation by storing an externally mutable object into NodeLabelsInfo.nodeLabelInfo At NodeLabelsInfo.java:representation by storing an externally mutable object into NodeLabelsInfo.nodeLabelInfo At NodeLabelsInfo.java:[line 42]
org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo.setNodeLabelInfo(ArrayList) may expose internal representation by storing an externally mutable object into NodeLabelsInfo.nodeLabelInfo At NodeLabelsInfo.java:by storing an externally mutable object into NodeLabelsInfo.nodeLabelInfo At NodeLabelsInfo.java:[line 92]
org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo.setNodeLabelsInfo(ArrayList) may expose internal representation by storing an externally mutable object into NodeLabelsInfo.nodeLabelInfo At NodeLabelsInfo.java:by storing an externally mutable object into NodeLabelsInfo.nodeLabelInfo At NodeLabelsInfo.java:[line 88]
Unknown bug pattern CT_CONSTRUCTOR_THROW in new org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig() At ClassSerialisationConfig.java:new org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig() At ClassSerialisationConfig.java:[line 208]
Unknown bug pattern CT_CONSTRUCTOR_THROW in new org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig(Configuration) At ClassSerialisationConfig.java:new org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig(Configuration) At ClassSerialisationConfig.java:[line 234]
org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig.getUnWrappedClasses() may expose internal representation by returning ClassSerialisationConfig.unWrappedClasses At ClassSerialisationConfig.java:by returning ClassSerialisationConfig.unWrappedClasses At ClassSerialisationConfig.java:[line 243]
org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig.getWrappedClasses() may expose internal representation by returning ClassSerialisationConfig.wrappedClasses At ClassSerialisationConfig.java:by returning ClassSerialisationConfig.wrappedClasses At ClassSerialisationConfig.java:[line 239]
Failed junit tests hadoop.yarn.server.resourcemanager.TestRMHA
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/9/artifact/out/Dockerfile
GITHUB PR #8033
Optional Tests dupname asflicense codespell detsecrets shellcheck shelldocs compile javac javadoc mvninstall mvnsite unit shadedclient xmllint spotbugs checkstyle jsonlint
uname Linux 8f16ec4aff96 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 / b7260bb
Default Java Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/9/testReport/
Max. process+thread count 950 (vs. ulimit of 5500)
modules C: hadoop-project hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-client-modules/hadoop-client-minicluster U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/9/console
versions git=2.25.1 maven=3.9.11 spotbugs=4.9.7 shellcheck=0.7.0
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 35s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 2s No case conflicting files found.
+0 🆗 codespell 0m 2s codespell was not available.
+0 🆗 detsecrets 0m 2s detect-secrets was not available.
+0 🆗 shelldocs 0m 2s Shelldocs was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+0 🆗 jsonlint 0m 0s jsonlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 95 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 10m 45s Maven dependency ordering for branch
+1 💚 mvninstall 28m 24s trunk passed
+1 💚 compile 15m 19s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 compile 15m 39s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 checkstyle 2m 58s trunk passed
+1 💚 mvnsite 3m 51s trunk passed
+1 💚 javadoc 3m 50s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 javadoc 3m 34s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+0 🆗 spotbugs 0m 48s branch/hadoop-project no spotbugs output file (spotbugsXml.xml)
-1 ❌ spotbugs 2m 48s /branch-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common-warnings.html hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common in trunk has 1100 extant spotbugs warnings.
-1 ❌ spotbugs 3m 17s /branch-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-warnings.html hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager in trunk has 1298 extant spotbugs warnings.
+0 🆗 spotbugs 0m 43s branch/hadoop-client-modules/hadoop-client-minicluster no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 26m 7s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 38s Maven dependency ordering for patch
+1 💚 mvninstall 8m 18s the patch passed
+1 💚 compile 14m 43s the patch passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 javac 14m 43s the patch passed
+1 💚 compile 15m 41s the patch passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 javac 15m 41s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 3m 14s /results-checkstyle-root.txt root: The patch generated 70 new + 161 unchanged - 2 fixed = 231 total (was 163)
+1 💚 mvnsite 3m 50s the patch passed
+1 💚 shellcheck 0m 0s No new issues.
-1 ❌ javadoc 1m 9s /results-javadoc-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04.txt hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04 with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04 generated 13 new + 5634 unchanged - 0 fixed = 5647 total (was 5634)
-1 ❌ javadoc 1m 9s /results-javadoc-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04.txt hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04 with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04 generated 12 new + 5436 unchanged - 0 fixed = 5448 total (was 5436)
+0 🆗 spotbugs 0m 41s hadoop-project has no data from spotbugs
-1 ❌ spotbugs 3m 33s /new-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.html hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager generated 13 new + 1292 unchanged - 6 fixed = 1305 total (was 1298)
+0 🆗 spotbugs 0m 43s hadoop-client-modules/hadoop-client-minicluster has no data from spotbugs
+1 💚 shadedclient 27m 9s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 41s hadoop-project in the patch passed.
+1 💚 unit 5m 40s hadoop-yarn-common in the patch passed.
+1 💚 unit 105m 31s hadoop-yarn-server-resourcemanager in the patch passed.
+1 💚 unit 0m 42s hadoop-client-minicluster in the patch passed.
+1 💚 asflicense 1m 2s The patch does not generate ASF License warnings.
330m 47s
Reason Tests
SpotBugs module:hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager
new org.apache.hadoop.yarn.server.resourcemanager.federation.FederationStateStoreHeartbeat(SubClusterId, FederationStateStore, ResourceScheduler, JAXBContextResolver) may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.rs At FederationStateStoreHeartbeat.java:may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.rs At FederationStateStoreHeartbeat.java:[line 65]
new org.apache.hadoop.yarn.server.resourcemanager.federation.FederationStateStoreHeartbeat(SubClusterId, FederationStateStore, ResourceScheduler, JAXBContextResolver) may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.stateStoreService At FederationStateStoreHeartbeat.java:may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.stateStoreService At FederationStateStoreHeartbeat.java:[line 63]
new org.apache.hadoop.yarn.server.resourcemanager.federation.FederationStateStoreHeartbeat(SubClusterId, FederationStateStore, ResourceScheduler, JAXBContextResolver) may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.subClusterId At FederationStateStoreHeartbeat.java:may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.subClusterId At FederationStateStoreHeartbeat.java:[line 64]
Unknown bug pattern CT_CONSTRUCTOR_THROW in new org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver() At JAXBContextResolver.java:new org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver() At JAXBContextResolver.java:[line 47]
Unknown bug pattern CT_CONSTRUCTOR_THROW in new org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver(Configuration) At JAXBContextResolver.java:new org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver(Configuration) At JAXBContextResolver.java:[line 58]
org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo.getNodeLabelsInfo() may expose internal representation by returning NodeLabelsInfo.nodeLabelInfo At NodeLabelsInfo.java:by returning NodeLabelsInfo.nodeLabelInfo At NodeLabelsInfo.java:[line 67]
new org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo(ArrayList) may expose internal representation by storing an externally mutable object into NodeLabelsInfo.nodeLabelInfo At NodeLabelsInfo.java:representation by storing an externally mutable object into NodeLabelsInfo.nodeLabelInfo At NodeLabelsInfo.java:[line 42]
org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo.setNodeLabelInfo(ArrayList) may expose internal representation by storing an externally mutable object into NodeLabelsInfo.nodeLabelInfo At NodeLabelsInfo.java:by storing an externally mutable object into NodeLabelsInfo.nodeLabelInfo At NodeLabelsInfo.java:[line 92]
org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeLabelsInfo.setNodeLabelsInfo(ArrayList) may expose internal representation by storing an externally mutable object into NodeLabelsInfo.nodeLabelInfo At NodeLabelsInfo.java:by storing an externally mutable object into NodeLabelsInfo.nodeLabelInfo At NodeLabelsInfo.java:[line 88]
Unknown bug pattern CT_CONSTRUCTOR_THROW in new org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig() At ClassSerialisationConfig.java:new org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig() At ClassSerialisationConfig.java:[line 208]
Unknown bug pattern CT_CONSTRUCTOR_THROW in new org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig(Configuration) At ClassSerialisationConfig.java:new org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig(Configuration) At ClassSerialisationConfig.java:[line 234]
org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig.getUnWrappedClasses() may expose internal representation by returning ClassSerialisationConfig.unWrappedClasses At ClassSerialisationConfig.java:by returning ClassSerialisationConfig.unWrappedClasses At ClassSerialisationConfig.java:[line 243]
org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig.getWrappedClasses() may expose internal representation by returning ClassSerialisationConfig.wrappedClasses At ClassSerialisationConfig.java:by returning ClassSerialisationConfig.wrappedClasses At ClassSerialisationConfig.java:[line 239]
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/10/artifact/out/Dockerfile
GITHUB PR #8033
Optional Tests dupname asflicense codespell detsecrets shellcheck shelldocs compile javac javadoc mvninstall mvnsite unit shadedclient xmllint spotbugs checkstyle jsonlint
uname Linux e8f9ad906217 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 / ba4ab13
Default Java Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/10/testReport/
Max. process+thread count 940 (vs. ulimit of 5500)
modules C: hadoop-project hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-client-modules/hadoop-client-minicluster U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/10/console
versions git=2.25.1 maven=3.9.11 spotbugs=4.9.7 shellcheck=0.7.0
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

@K0K0V0K K0K0V0K changed the title WIP: YARN-11874. FIX YARN REST IF YARN-11874. ResourceManager REST API backward compatibility with Jersey1 Oct 17, 2025
@K0K0V0K K0K0V0K marked this pull request as ready for review October 17, 2025 10:03
@K0K0V0K
Copy link
Contributor Author

K0K0V0K commented Oct 17, 2025

Hi @slfan1989!

I think i reached a reviewable phase with this PR.
If you have some time, would you be so kind to review these changes?
Thanks in advance!

@slfan1989
Copy link
Contributor

Hi @slfan1989!

I think i reached a reviewable phase with this PR. If you have some time, would you be so kind to review these changes? Thanks in advance!

Thanks a lot for your great work on this! This PR is really important, and I’ll make it my top priority to follow up.

Copy link
Contributor

@Hean-Chhinling Hean-Chhinling left a comment

Choose a reason for hiding this comment

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

Thank you @K0K0V0K for raising this PR. This really help a lot!
It looks good to me but I do have some clean up comments and some follow up questions.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 37s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 shelldocs 0m 1s Shelldocs was not available.
+0 🆗 xmllint 0m 1s xmllint was not available.
+0 🆗 jsonlint 0m 1s jsonlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 95 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 9m 6s Maven dependency ordering for branch
+1 💚 mvninstall 31m 24s trunk passed
+1 💚 compile 16m 40s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 compile 15m 47s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 checkstyle 3m 20s trunk passed
+1 💚 mvnsite 3m 36s trunk passed
+1 💚 javadoc 3m 37s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 javadoc 3m 9s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+0 🆗 spotbugs 0m 40s branch/hadoop-project no spotbugs output file (spotbugsXml.xml)
-1 ❌ spotbugs 2m 57s /branch-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common-warnings.html hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common in trunk has 1100 extant spotbugs warnings.
-1 ❌ spotbugs 3m 24s /branch-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-warnings.html hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager in trunk has 1298 extant spotbugs warnings.
+0 🆗 spotbugs 0m 36s branch/hadoop-client-modules/hadoop-client-minicluster no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 28m 29s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 37s Maven dependency ordering for patch
+1 💚 mvninstall 10m 14s the patch passed
+1 💚 compile 16m 37s the patch passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 javac 16m 37s the patch passed
+1 💚 compile 18m 13s the patch passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 javac 18m 13s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 3m 41s /results-checkstyle-root.txt root: The patch generated 6 new + 161 unchanged - 2 fixed = 167 total (was 163)
+1 💚 mvnsite 3m 42s the patch passed
+1 💚 shellcheck 0m 0s No new issues.
-1 ❌ javadoc 1m 7s /patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04.txt hadoop-yarn-server-resourcemanager in the patch failed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04.
-1 ❌ javadoc 1m 9s /patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04.txt hadoop-yarn-server-resourcemanager in the patch failed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04.
+0 🆗 spotbugs 0m 34s hadoop-project has no data from spotbugs
-1 ❌ spotbugs 3m 57s /new-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.html hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager generated 9 new + 1295 unchanged - 3 fixed = 1304 total (was 1298)
+0 🆗 spotbugs 0m 34s hadoop-client-modules/hadoop-client-minicluster has no data from spotbugs
+1 💚 shadedclient 31m 26s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 32s hadoop-project in the patch passed.
+1 💚 unit 5m 55s hadoop-yarn-common in the patch passed.
-1 ❌ unit 107m 41s /patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt hadoop-yarn-server-resourcemanager in the patch passed.
+1 💚 unit 0m 34s hadoop-client-minicluster in the patch passed.
+1 💚 asflicense 1m 2s The patch does not generate ASF License warnings.
348m 2s
Reason Tests
SpotBugs module:hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager
new org.apache.hadoop.yarn.server.resourcemanager.federation.FederationStateStoreHeartbeat(SubClusterId, FederationStateStore, ResourceScheduler, JAXBContextResolver) may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.rs At FederationStateStoreHeartbeat.java:may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.rs At FederationStateStoreHeartbeat.java:[line 65]
new org.apache.hadoop.yarn.server.resourcemanager.federation.FederationStateStoreHeartbeat(SubClusterId, FederationStateStore, ResourceScheduler, JAXBContextResolver) may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.stateStoreService At FederationStateStoreHeartbeat.java:may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.stateStoreService At FederationStateStoreHeartbeat.java:[line 63]
new org.apache.hadoop.yarn.server.resourcemanager.federation.FederationStateStoreHeartbeat(SubClusterId, FederationStateStore, ResourceScheduler, JAXBContextResolver) may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.subClusterId At FederationStateStoreHeartbeat.java:may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.subClusterId At FederationStateStoreHeartbeat.java:[line 64]
Unknown bug pattern CT_CONSTRUCTOR_THROW in new org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver() At JAXBContextResolver.java:new org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver() At JAXBContextResolver.java:[line 47]
Unknown bug pattern CT_CONSTRUCTOR_THROW in new org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver(Configuration) At JAXBContextResolver.java:new org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver(Configuration) At JAXBContextResolver.java:[line 58]
Unknown bug pattern CT_CONSTRUCTOR_THROW in new org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig() At ClassSerialisationConfig.java:new org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig() At ClassSerialisationConfig.java:[line 175]
Unknown bug pattern CT_CONSTRUCTOR_THROW in new org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig(Configuration) At ClassSerialisationConfig.java:new org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig(Configuration) At ClassSerialisationConfig.java:[line 209]
org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig.getUnWrappedClasses() may expose internal representation by returning ClassSerialisationConfig.unWrappedClasses At ClassSerialisationConfig.java:by returning ClassSerialisationConfig.unWrappedClasses At ClassSerialisationConfig.java:[line 236]
org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig.getWrappedClasses() may expose internal representation by returning ClassSerialisationConfig.wrappedClasses At ClassSerialisationConfig.java:by returning ClassSerialisationConfig.wrappedClasses At ClassSerialisationConfig.java:[line 223]
Failed junit tests hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesNodeLabels
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/11/artifact/out/Dockerfile
GITHUB PR #8033
Optional Tests dupname asflicense codespell detsecrets shellcheck shelldocs compile javac javadoc mvninstall mvnsite unit shadedclient xmllint spotbugs checkstyle jsonlint
uname Linux b7a02d4e5a24 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 / d8e7445
Default Java Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/11/testReport/
Max. process+thread count 974 (vs. ulimit of 5500)
modules C: hadoop-project hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-client-modules/hadoop-client-minicluster U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/11/console
versions git=2.25.1 maven=3.9.11 spotbugs=4.9.7 shellcheck=0.7.0
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

- replace expected string to const
- remove dead code
Copy link
Member

@brumi1024 brumi1024 left a comment

Choose a reason for hiding this comment

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

Thanks @K0K0V0K, this is an important regression fix. LGTM, but let's ensure that the YETUS version and configs change is reverted in a follow-up.

YETUS='yetus'
// Branch or tag name. Yetus release tags are 'rel/X.Y.Z'
YETUS_VERSION='rel/0.14.0'
YETUS_VERSION='a7d29a6a72750a0c5c39512f33945e773e69303e'
Copy link
Member

Choose a reason for hiding this comment

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

Let's not forget to revert this in a follow-up, once this gets merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @brumi1024 for the review!

@slfan1989
Copy link
Contributor

@K0K0V0K Thank you for your contribution. I need some time to carefully review this PR and expect to provide a final conclusion by tomorrow.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 34s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 2s No case conflicting files found.
+0 🆗 codespell 0m 2s codespell was not available.
+0 🆗 detsecrets 0m 2s detect-secrets was not available.
+0 🆗 shelldocs 0m 2s Shelldocs was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+0 🆗 jsonlint 0m 0s jsonlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 95 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 7m 56s Maven dependency ordering for branch
+1 💚 mvninstall 28m 28s trunk passed
+1 💚 compile 15m 17s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 compile 15m 30s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 checkstyle 3m 16s trunk passed
+1 💚 mvnsite 3m 57s trunk passed
+1 💚 javadoc 3m 45s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 javadoc 3m 36s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+0 🆗 spotbugs 0m 47s branch/hadoop-project no spotbugs output file (spotbugsXml.xml)
-1 ❌ spotbugs 2m 46s /branch-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common-warnings.html hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common in trunk has 1100 extant spotbugs warnings.
-1 ❌ spotbugs 3m 14s /branch-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-warnings.html hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager in trunk has 1298 extant spotbugs warnings.
+0 🆗 spotbugs 0m 42s branch/hadoop-client-modules/hadoop-client-minicluster no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 25m 59s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 35s Maven dependency ordering for patch
+1 💚 mvninstall 8m 25s the patch passed
+1 💚 compile 15m 14s the patch passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 javac 15m 14s the patch passed
+1 💚 compile 15m 25s the patch passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 javac 15m 25s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 3m 16s /results-checkstyle-root.txt root: The patch generated 8 new + 161 unchanged - 2 fixed = 169 total (was 163)
+1 💚 mvnsite 3m 55s the patch passed
+1 💚 shellcheck 0m 0s No new issues.
-1 ❌ javadoc 1m 11s /patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04.txt hadoop-yarn-server-resourcemanager in the patch failed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04.
-1 ❌ javadoc 1m 8s /patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04.txt hadoop-yarn-server-resourcemanager in the patch failed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04.
+0 🆗 spotbugs 0m 42s hadoop-project has no data from spotbugs
-1 ❌ spotbugs 3m 36s /new-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.html hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager generated 9 new + 1295 unchanged - 3 fixed = 1304 total (was 1298)
+0 🆗 spotbugs 0m 43s hadoop-client-modules/hadoop-client-minicluster has no data from spotbugs
+1 💚 shadedclient 27m 44s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 40s hadoop-project in the patch passed.
+1 💚 unit 5m 41s hadoop-yarn-common in the patch passed.
+1 💚 unit 106m 38s hadoop-yarn-server-resourcemanager in the patch passed.
+1 💚 unit 0m 41s hadoop-client-minicluster in the patch passed.
+1 💚 asflicense 1m 3s The patch does not generate ASF License warnings.
329m 51s
Reason Tests
SpotBugs module:hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager
new org.apache.hadoop.yarn.server.resourcemanager.federation.FederationStateStoreHeartbeat(SubClusterId, FederationStateStore, ResourceScheduler, JAXBContextResolver) may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.rs At FederationStateStoreHeartbeat.java:may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.rs At FederationStateStoreHeartbeat.java:[line 65]
new org.apache.hadoop.yarn.server.resourcemanager.federation.FederationStateStoreHeartbeat(SubClusterId, FederationStateStore, ResourceScheduler, JAXBContextResolver) may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.stateStoreService At FederationStateStoreHeartbeat.java:may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.stateStoreService At FederationStateStoreHeartbeat.java:[line 63]
new org.apache.hadoop.yarn.server.resourcemanager.federation.FederationStateStoreHeartbeat(SubClusterId, FederationStateStore, ResourceScheduler, JAXBContextResolver) may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.subClusterId At FederationStateStoreHeartbeat.java:may expose internal representation by storing an externally mutable object into FederationStateStoreHeartbeat.subClusterId At FederationStateStoreHeartbeat.java:[line 64]
Unknown bug pattern CT_CONSTRUCTOR_THROW in new org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver() At JAXBContextResolver.java:new org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver() At JAXBContextResolver.java:[line 47]
Unknown bug pattern CT_CONSTRUCTOR_THROW in new org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver(Configuration) At JAXBContextResolver.java:new org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver(Configuration) At JAXBContextResolver.java:[line 58]
Unknown bug pattern CT_CONSTRUCTOR_THROW in new org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig() At ClassSerialisationConfig.java:new org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig() At ClassSerialisationConfig.java:[line 175]
Unknown bug pattern CT_CONSTRUCTOR_THROW in new org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig(Configuration) At ClassSerialisationConfig.java:new org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig(Configuration) At ClassSerialisationConfig.java:[line 209]
org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig.getUnWrappedClasses() may expose internal representation by returning ClassSerialisationConfig.unWrappedClasses At ClassSerialisationConfig.java:by returning ClassSerialisationConfig.unWrappedClasses At ClassSerialisationConfig.java:[line 236]
org.apache.hadoop.yarn.server.resourcemanager.webapp.jsonprovider.ClassSerialisationConfig.getWrappedClasses() may expose internal representation by returning ClassSerialisationConfig.wrappedClasses At ClassSerialisationConfig.java:by returning ClassSerialisationConfig.wrappedClasses At ClassSerialisationConfig.java:[line 223]
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/12/artifact/out/Dockerfile
GITHUB PR #8033
Optional Tests dupname asflicense codespell detsecrets shellcheck shelldocs compile javac javadoc mvninstall mvnsite unit shadedclient xmllint spotbugs checkstyle jsonlint
uname Linux 32fe6ee1751a 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 / 6bebef6
Default Java Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/12/testReport/
Max. process+thread count 954 (vs. ulimit of 5500)
modules C: hadoop-project hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-client-modules/hadoop-client-minicluster U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8033/12/console
versions git=2.25.1 maven=3.9.11 spotbugs=4.9.7 shellcheck=0.7.0
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

assertEquals(MediaType.APPLICATION_XML_TYPE + ";" + JettyUtils.UTF_8,
response.getMediaType().toString());
String xml = response.readEntity(String.class);
System.err.println(xml);
Copy link
Contributor

Choose a reason for hiding this comment

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

This line can be removed.


public final WebTarget targetWithJsonObject() {
return target().register(new JettisonObjectProvider.App());
return target();
Copy link
Contributor

Choose a reason for hiding this comment

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

We introduced targetWithJsonObject() mainly to keep compatibility with existing calls, such as those in the MapReduce and NodeManager modules, which still use:

response.readEntity(JSONObject.class);

Without this method, we would have to change it to:

String res = response.readEntity(String.class);
JSONObject jsonObject = new JSONObject(res);

That would affect other modules and make the code less consistent, so keeping the original interface is a safer choice.

import java.net.InetSocketAddress;

import org.apache.hadoop.conf.Configuration;

Copy link
Contributor

Choose a reason for hiding this comment

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

avoid

Copy link
Contributor

@slfan1989 slfan1989 left a comment

Choose a reason for hiding this comment

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

I’ve checked out this PR locally and overall I agree with the changes — great work! There are just a few minor points I’d like to mention:

  • I’d prefer to keep the usage of response.readEntity(JSONObject.class);.
    Perhaps we could introduce an additional reader to support this, since this approach is actually the recommended one in Jersey 2.

  • The JSON comparison in the resource has been nicely restored to match the original one — really appreciate that!
    However, for "attributes" : "", it would be better to change it to "attributes" : {} to maintain the correct structure.

  • The targetWithJsonObject method in JerseyTestBase.java is also used in MapReduce and NodeManager, so it shouldn’t be replaced directly with target().
    We need to make sure those modules remain compatible.

@Override
public boolean configure(FeatureContext context) {
//Auto discovery should be disabled to ensure the custom providers will be used
context.property(CommonProperties.MOXY_JSON_FEATURE_DISABLE, true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like 2001 and 2002 are priority values that control the provider order, right?
Maybe we could add a short comment to explain their meaning — it would make the intent clearer for future contributors.

.get(Response.class);
assertEquals(MediaType.APPLICATION_JSON_TYPE + ";" + JettyUtils.UTF_8,
response.getMediaType().toString());
JSONObject json = response.readEntity(JSONObject.class);
Copy link
Contributor

Choose a reason for hiding this comment

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

Any chance we can keep this pattern?

I find response.readEntity(JSONObject.class); cleaner and more intuitive — it’s also how things worked back in Jersey 1.

"vCores" : 0,
"resourceInformations" : {
"resourceInformation" : [ {
"attributes" : "",
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than deleting "attributes": "", we should change it back to "attributes": { } to maintain the expected JSON format.

Copy link
Contributor

@Hean-Chhinling Hean-Chhinling left a comment

Choose a reason for hiding this comment

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

LGTM with the latest changes!
Thank you @K0K0V0K for the contributions.

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.

5 participants