-
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-11614. [Federation] Add Federation PolicyManager Validation Rules. #6271
Conversation
💔 -1 overall
This message was automatically generated. |
@@ -170,6 +170,26 @@ public static void checkHeadRoomAlphaValid(String headRoomAlpha) throws YarnExce | |||
} | |||
} | |||
|
|||
public static void checkPolicyManagerValid(String policyManager) throws YarnException { | |||
switch (policyManager) { | |||
case "org.apache.hadoop.yarn.server.federation.policies.manager.HashBroadcastPolicyManager": |
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.
Can we use some of the getClass().getSimpleName() or similar methods?
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.
This is a good idea! I will improve this part of the code. I will add verification on the router side.
case "org.apache.hadoop.yarn.server.federation.policies.manager.HashBroadcastPolicyManager": | ||
throw new YarnException("HashBroadcastPolicyManager does not support the use of queue weights."); | ||
case "org.apache.hadoop.yarn.server.federation.policies.manager.HomePolicyManager": | ||
throw new YarnException("HomePolicyManager does not support the use of queue weights."); |
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 think we can do a list for the ones that support weights, and if it's not there, return the exception,
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 will improve this part of the code.
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@goiri Thank you very much for your help in reviewing the code! |
…s. (apache#6271) Contributed by Shilun Fan. Reviewed-by: Inigo Goiri <[email protected]> Signed-off-by: Shilun Fan <[email protected]>
Description of PR
JIRA: YARN-11614. [Federation] Add Federation PolicyManager Validation Rules.
When entering queue weights in Federation, it is essential to enhance the validation rules. If a policy manager does not support weights, a prompt should be provided to the user.
How was this patch tested?
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?