You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
YARN RM can transiently report negative available resources (e.g. cluster_capacity - allocated goes negative due to overload or node failures). DefaultAMSProcessor now applies Resources.componentwiseMax with Resources.none() before setting available resources in AllocateResponse, ensuring the AM always receives a non-negative value.
This is a re-implementation of YARN-11964 (reverted in #8519). The previous fix applied the clamp inside Resource.castToIntSafely(), which was too broad and caused a regression in TestRLESparseResourceAllocation. This fix applies the clamp at the correct layer — in DefaultAMSProcessor where the AllocateResponse is built.
Contains content generated by Claude (Anthropic)
How was this patch tested?
Added TestDefaultAMSProcessor#testAvailableResourcesClampedToNonNegative which uses a custom scheduler that returns a negative resource limit and verifies the AllocateResponse always contains non-negative available resources.
@ryukobayashi, the Test hdfs-rbf failure and hang can be ignored, it is caused by another PR, and the author is working on the solution, but the Test mr is expected to pass. Since the GHA job runs on your forked repo, you have permission to rerun it if you think it's a flaky test which is irrelevant to your change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
YARN RM can transiently report negative available resources (e.g. cluster_capacity - allocated goes negative due to overload or node failures).
DefaultAMSProcessornow appliesResources.componentwiseMaxwithResources.none()before setting available resources inAllocateResponse, ensuring the AM always receives a non-negative value.This is a re-implementation of YARN-11964 (reverted in #8519). The previous fix applied the clamp inside
Resource.castToIntSafely(), which was too broad and caused a regression inTestRLESparseResourceAllocation. This fix applies the clamp at the correct layer — inDefaultAMSProcessorwhere theAllocateResponseis built.Contains content generated by Claude (Anthropic)
How was this patch tested?
TestDefaultAMSProcessor#testAvailableResourcesClampedToNonNegativewhich uses a custom scheduler that returns a negative resource limit and verifies theAllocateResponsealways contains non-negative available resources.TestApplicationMasterServiceCapacity,TestApplicationMasterServiceFair,TestApplicationMasterServiceInterceptor,TestRLESparseResourceAllocation.For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?AI Tooling
https://www.apache.org/legal/generative-tooling.html