-
Notifications
You must be signed in to change notification settings - Fork 9.2k
YARN-10760. Number of allocated OPPORTUNISTIC containers can dip below 0 #3642
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
Conversation
* Checks that we do not release containers that do not exist * Checks that we increment recovered allocated OPPORTUNISTIC containers on RM restart * Adds corresponding test
...main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AbstractYarnScheduler.java
Show resolved
Hide resolved
.../apache/hadoop/yarn/server/resourcemanager/TestOpportunisticContainerAllocatorAMService.java
Show resolved
Hide resolved
|
|
||
| OpportunisticSchedulerMetrics metrics = | ||
| OpportunisticSchedulerMetrics.getMetrics(); | ||
| Assert.assertEquals(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 probably want to assert before this too with a 0 and maybe one of the cases where we do not increment.
I have the feeling this test passes even without the code changes.
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.
Makes sense. This helped me find that while the test passes when run on its own, it fails when run with the rest of the tests in the class since the metrics were not re-initialized between tests.
|
@goiri thanks for the review! Pushed a new commit to address your comments, please have another look. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
Description of PR
RM restart
How was this patch tested?