Skip to content

YARN-11995. Preserve custom resource allocations in timeline container history (branch-3.4) - #8810

Open
gerashegalov wants to merge 2 commits into
apache:branch-3.4from
gerashegalov:YARN-11995-branch-3.4-backport
Open

gerashegalov wants to merge 2 commits into
apache:branch-3.4from
gerashegalov:YARN-11995-branch-3.4-backport

Conversation

@gerashegalov

@gerashegalov gerashegalov commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Description of PR

Backport YARN-11995 from #8770 to branch-3.4 by cherry-picking trunk commit 7d8dc187523c38d2df607fa251693fc11bb6de0d with -x.

The production changes are unchanged. The test changes adapt the backport to the branch's JUnit 4 test classes and Jersey 1 AHS web-test API. This preserves custom container resource allocations and units across the YARN timeline publishers and history readers while retaining compatibility with existing memory/vcore fields and older timeline entities. A follow-up closes the new AHS test's ClientResponse on both success and FORBIDDEN paths.

Contains content generated by OpenAI Codex.

How was this patch tested?

  • Initial targeted Maven reactor tests for TestTimelineServiceHelper, TestApplicationHistoryManagerOnTimelineStore, TestAHSWebServices, TestSystemMetricsPublisher, TestSystemMetricsPublisherForV2, TestNMTimelinePublisher, and TestAHSv2ClientImpl: 113 tests passed, no failures or errors.
  • After the response cleanup, targeted Maven reactor tests for TestAHSWebServices: 38 tests passed, no failures or errors.
  • git diff --check passed.

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? (Not applicable.)
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0? (No new dependencies.)
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files? (Not applicable.)

…r history (apache#8770) Contributed by Gera Shegalov

* YARN-11995. Preserve custom resource allocations in timeline container history.

Persist nonzero custom resource allocations and their units in YARN_CONTAINER_ALLOCATED_RESOURCES. Update all three timeline publishers and both history report converters, preserving compatibility with existing memory/vcore fields and legacy entities.

Snapshot allocations before asynchronous publication. Convert stored values to the reader's configured units, skip unknown or malformed entries individually, and omit the field when no custom allocation exists.

Add regression tests and document the stored format, resource-type configuration requirements, and limitations for older history data.

Contains content generated by OpenAI Codex.

Reviewed-by: Jose Luis López López <joseluisll@gmail.com>
Reviewed-by: Shilun Fan <slfan1989@apache.org>
Signed-off-by: Gera Shegalov <gshegalov@nvidia.com>
(cherry picked from commit 7d8dc18)
@gerashegalov

Copy link
Copy Markdown
Contributor Author

@joseluisll PTAL

@slfan1989 slfan1989 self-assigned this Oct 11, 2026
@hadoop-yetus

Copy link
Copy Markdown

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 19m 48s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 7 new or modified test files.
_ branch-3.4 Compile Tests _
+0 🆗 mvndep 9m 16s Maven dependency ordering for branch
+1 💚 mvninstall 49m 53s branch-3.4 passed
+1 💚 compile 9m 6s branch-3.4 passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 8m 57s branch-3.4 passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 2m 0s branch-3.4 passed
+1 💚 mvnsite 5m 15s branch-3.4 passed
+1 💚 javadoc 5m 17s branch-3.4 passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 4m 58s branch-3.4 passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
-1 ❌ spotbugs 2m 3s /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 branch-3.4 has 1 extant spotbugs warnings.
+0 🆗 spotbugs 0m 37s branch/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 39m 58s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 33s Maven dependency ordering for patch
+1 💚 mvninstall 3m 39s the patch passed
+1 💚 compile 9m 7s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javac 9m 7s the patch passed
+1 💚 compile 9m 38s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 9m 38s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 2m 12s the patch passed
+1 💚 mvnsite 4m 41s the patch passed
+1 💚 javadoc 4m 38s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 4m 21s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+0 🆗 spotbugs 0m 31s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site has no data from spotbugs
+1 💚 shadedclient 40m 41s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 5m 39s hadoop-yarn-common in the patch passed.
+1 💚 unit 4m 41s hadoop-yarn-server-applicationhistoryservice in the patch passed.
+1 💚 unit 119m 36s hadoop-yarn-server-resourcemanager in the patch passed.
+1 💚 unit 24m 35s hadoop-yarn-server-nodemanager in the patch passed.
+1 💚 unit 28m 32s hadoop-yarn-client in the patch passed.
+1 💚 unit 0m 35s hadoop-yarn-site in the patch passed.
+1 💚 asflicense 1m 6s The patch does not generate ASF License warnings.
441m 51s
Subsystem Report/Notes
Docker ClientAPI=1.56 ServerAPI=1.56 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8810/1/artifact/out/Dockerfile
GITHUB PR #8810
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets markdownlint
uname Linux 60cf13f39eb1 5.15.0-185-generic #195-Ubuntu SMP Fri Jun 19 17:11:50 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision branch-3.4 / 7ea3065
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-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-8810/1/testReport/
Max. process+thread count 1896 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8810/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.

@gerashegalov

Copy link
Copy Markdown
Contributor Author

The Yetus -1 appears to come from an existing branch-3.4 SpotBugs warning in ResourceManager.activeServices, not from this backport. ResourceManager.java is unchanged, and the branch and patch reports show the same warning. The patch’s compilation, checks, and unit tests passed.

The separate Build check appears to be the branch’s workflow-detection issue. I’m happy to address any finding specific to the patch.

@joseluisll

Copy link
Copy Markdown
Contributor

@joseluisll PTAL

The new test never closes its ClientResponse. The already existing tests don't either, so I'd leave it.

@slfan1989 slfan1989 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The backport looks good to me.

The remaining CI issues appear unrelated to this patch.

One small, non-blocking suggestion: please close the new ClientResponse in a finally block, including the FORBIDDEN path, to preserve the cleanup provided by the original test.

Contains content generated by OpenAI Codex.

Signed-off-by: Gera Shegalov <gshegalov@nvidia.com>
@hadoop-yetus

Copy link
Copy Markdown

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 7m 45s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 7 new or modified test files.
_ branch-3.4 Compile Tests _
+0 🆗 mvndep 12m 4s Maven dependency ordering for branch
+1 💚 mvninstall 23m 51s branch-3.4 passed
+1 💚 compile 3m 48s branch-3.4 passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 3m 35s branch-3.4 passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 1m 0s branch-3.4 passed
+1 💚 mvnsite 3m 36s branch-3.4 passed
+1 💚 javadoc 3m 32s branch-3.4 passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 3m 2s branch-3.4 passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
-1 ❌ spotbugs 1m 19s /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 branch-3.4 has 1 extant spotbugs warnings.
+0 🆗 spotbugs 0m 24s branch/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site no spotbugs output file (spotbugsXml.xml)
-1 ❌ shadedclient 32m 22s branch has errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 21s Maven dependency ordering for patch
+1 💚 mvninstall 2m 14s the patch passed
-1 ❌ compile 0m 46s /patch-compile-hadoop-yarn-project_hadoop-yarn-jdkUbuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04.txt hadoop-yarn in the patch failed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04.
-1 ❌ javac 0m 46s /patch-compile-hadoop-yarn-project_hadoop-yarn-jdkUbuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04.txt hadoop-yarn in the patch failed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04.
+1 💚 compile 3m 51s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 3m 51s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 51s /buildtool-patch-checkstyle-hadoop-yarn-project_hadoop-yarn.txt The patch fails to run checkstyle in hadoop-yarn
-1 ❌ mvnsite 0m 27s /patch-mvnsite-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common.txt hadoop-yarn-common in the patch failed.
-1 ❌ mvnsite 0m 27s /patch-mvnsite-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-applicationhistoryservice.txt hadoop-yarn-server-applicationhistoryservice in the patch failed.
-1 ❌ mvnsite 0m 12s /patch-mvnsite-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt hadoop-yarn-server-resourcemanager in the patch failed.
-1 ❌ mvnsite 0m 27s /patch-mvnsite-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager.txt hadoop-yarn-server-nodemanager in the patch failed.
+1 💚 javadoc 2m 33s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
-1 ❌ javadoc 0m 12s /patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common-jdkPrivateBuild-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09.txt hadoop-yarn-common in the patch failed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09.
-1 ❌ javadoc 0m 27s /patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-applicationhistoryservice-jdkPrivateBuild-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09.txt hadoop-yarn-server-applicationhistoryservice in the patch failed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09.
-1 ❌ javadoc 0m 36s /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.
-1 ❌ javadoc 0m 33s /patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdkPrivateBuild-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09.txt hadoop-yarn-server-nodemanager in the patch failed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09.
-1 ❌ javadoc 0m 13s /patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-client-jdkPrivateBuild-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09.txt hadoop-yarn-client in the patch failed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09.
-1 ❌ spotbugs 0m 28s /patch-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common.txt hadoop-yarn-common in the patch failed.
-1 ❌ spotbugs 0m 32s /patch-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-applicationhistoryservice.txt hadoop-yarn-server-applicationhistoryservice in the patch failed.
-1 ❌ spotbugs 0m 33s /patch-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt hadoop-yarn-server-resourcemanager in the patch failed.
-1 ❌ spotbugs 0m 27s /patch-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager.txt hadoop-yarn-server-nodemanager in the patch failed.
-1 ❌ spotbugs 0m 27s /patch-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-client.txt hadoop-yarn-client in the patch failed.
-1 ❌ spotbugs 0m 27s /patch-spotbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-site.txt hadoop-yarn-site in the patch failed.
+1 💚 shadedclient 13m 46s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 2m 17s hadoop-yarn-common in the patch passed.
-1 ❌ unit 0m 28s /patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-applicationhistoryservice.txt hadoop-yarn-server-applicationhistoryservice in the patch failed.
-1 ❌ unit 0m 29s /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 28s /patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager.txt hadoop-yarn-server-nodemanager in the patch failed.
-1 ❌ unit 0m 28s /patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-client.txt hadoop-yarn-client in the patch failed.
-1 ❌ unit 0m 30s /patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-site.txt hadoop-yarn-site in the patch failed.
+1 💚 asflicense 0m 21s The patch does not generate ASF License warnings.
127m 22s
Subsystem Report/Notes
Docker ClientAPI=1.56 ServerAPI=1.56 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8810/2/artifact/out/Dockerfile
GITHUB PR #8810
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets markdownlint
uname Linux 35a21616aff0 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision branch-3.4 / 6fbec62
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-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-8810/2/testReport/
Max. process+thread count 615 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8810/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.

@gerashegalov

Copy link
Copy Markdown
Contributor Author

@joseluisll PTAL

This branch has not been deployed

No deployments
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.

4 participants