goiri commented on code in PR #6271:
URL: https://github.com/apache/hadoop/pull/6271#discussion_r1394634988
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/FederationQueueWeight.java:
##########
@@ -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":
Review Comment:
Can we use some of the getClass().getSimpleName() or similar methods?
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/FederationQueueWeight.java:
##########
@@ -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":
+ 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.");
Review Comment:
I think we can do a list for the ones that support weights, and if it's not
there, return the exception,
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]