-
Notifications
You must be signed in to change notification settings - Fork 9.1k
YARN-11827. Fix the bug of 'Removing extra containers' when autoCorrectContainerAllocation is enabled. #7744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
…ctContainerAllocation is enabled.
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please consider adding unit test for this.
if (numContainerAllocated > 0) { | ||
int numContainerAsk = request.getNumContainers(); | ||
int numContainerAsk = request.getNumContainers(); | ||
if (numContainerAllocated > 0 && numContainerAsk > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When AM’s AskList has its container count set to 0 , This indicates that AM no longer need any containers. Isn't it safe to RELEASE all the allocated container in that case ? (Which is what the code is doing) ?
Even if the allocated containers are set to AM, They AM may choose to not use it or release it back
When a ResourceRequest in the AM’s AskList has its container count set to 0, it causes the
autoCorrectContainerAllocation
to erroneously remove already allocated containers.