-
Notifications
You must be signed in to change notification settings - Fork 9.1k
YARN-11014. YARN incorrectly validates maximum capacity resources on … #3715
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
…the validation API
💔 -1 overall
This message was automatically generated. |
🎊 +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.
Thank you @brumi1024 for working on this. The change is well done, I do not have objections on that part. What could be improved here I think would be a test case for a custom resource as well and see what happens in that case.
setUpMockRM(false); | ||
RMContext rmContext = mockRM.getRMContext(); | ||
CapacitySchedulerConfiguration oldConfiguration = cs.getConfiguration(); | ||
CapacitySchedulerConfiguration newConfiguration = | ||
new CapacitySchedulerConfiguration(cs.getConfiguration()); | ||
newConfiguration.setMaximumResourceRequirement("", LEAF_A_FULL_PATH, FULL_MAXRES); | ||
try { | ||
CapacitySchedulerConfigValidator | ||
.validateCSConfiguration(oldConfiguration, newConfiguration, rmContext); | ||
fail("Parent maximum capacity exceeded"); | ||
} catch (IOException e) { | ||
Assert.assertTrue(e.getCause().getMessage() | ||
.startsWith("Max resource configuration")); | ||
} finally { | ||
mockRM.stop(); | ||
} |
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.
I am wondering whether this block could be extracted like the following:
CapacitySchedulerConfiguration newConfiguration =
new CapacitySchedulerConfiguration(cs.getConfiguration());
newConfiguration.setMaximumResourceRequirement("", LEAF_A_FULL_PATH, FULL_MAXRES);
boolean shouldFail = false;
validateCSConfig(newConfiguration, shouldFail);
🎊 +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.
Thank you for the changes @brumi1024. I had a few feedbacks. +1 from me once they are fixed.
...oop/yarn/server/resourcemanager/scheduler/capacity/TestCapacitySchedulerConfigValidator.java
Outdated
Show resolved
Hide resolved
...oop/yarn/server/resourcemanager/scheduler/capacity/TestCapacitySchedulerConfigValidator.java
Outdated
Show resolved
Hide resolved
🎊 +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.
The latest revision looks good to me +1.
Thanks @brumi1024 for working on this. |
…the validation API
Description of PR
How was this patch tested?
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?