-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
YARN-11702: Fix Yarn over allocating containers #6990
Conversation
💔 -1 overall
This message was automatically generated. |
@slfan1989 @p-szucs Could you please review the changes ? |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@slfan1989 @aajisaka Could you please review the changes ? |
...main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AbstractYarnScheduler.java
Show resolved
Hide resolved
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml
Outdated
Show resolved
Hide resolved
Hi @slfan1989 would you take a look? To be honest, I'm not familiar with the latest YARN code base and it's possible I might miss something. |
🎊 +1 overall
This message was automatically generated. |
Thank you @shameersss1. I'll merge this in this weekend if there's no objection. |
@aajisaka Sorry I missed some messages. I will review this PR. Please give me 1-2 days. cc: @shameersss1 |
Why are multiple requests for Containers sent? This is the key to the problem. |
@zeekling ,That's how the AMRMClient is implemented. As long as AM doesn't get the required containers, it keeps on sending the request in every heartbeat untill all the container request is fulfilled. |
@slfan1989 - Gentle reminder for review. |
@shameersss1 Thank you for your contribution. I will complete the review today. |
@Override | ||
public int hashCode() { | ||
final int prime = 31; | ||
int result = 1; |
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.
We typically use HashCodeBuilder
.
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.
ack
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (obj == null) { |
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.
EqualsBuilder
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.
ack
@shameersss1 Thank you very much for your contribution! From my perspective, it makes sense, and the code quality is high. I have left comments on a few minor details. |
The scheduler will not discard resource application requests, so why do we need to apply multiple times? |
Yes, but the way AMRMClient in Hadoop works in a way that AM always sends pendingconatiner request as part of heartbeat. This is done because of two reasons
|
@aajisaka @slfan1989 - I have addressed the latest comments - Please review |
🎊 +1 overall
This message was automatically generated. |
@shameersss1 Thanks for the contribution! If there are no other comments in the next 2 days, we will merge this PR to the trunk branch. |
@shameersss1 Thanks for the contribution! @aajisaka @zeekling Thanks for the review! |
Description of PR
Refer https://issues.apache.org/jira/browse/YARN-11702 for more information
How was this patch tested?
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?