susheelgupta7 commented on code in PR #8686:
URL: https://github.com/apache/hadoop/pull/8686#discussion_r3794970500
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-capacity-scheduler-ui/src/main/webapp/src/features/placement-rules/utils/queueOptions.ts:
##########
@@ -26,13 +27,53 @@ export interface QueueOption {
}
/**
- * Check if a queue has children (is a parent queue)
+ * Accessor for a queue's effective property value. Matches the store's
getQueuePropertyValue.
*/
-function isParentQueue(queue: QueueInfo): boolean {
- return !!(
+export type QueuePropertyAccessor = (
+ queuePath: string,
+ property: string,
+) => { value: string; isStaged: boolean };
+
+/**
+ * Check whether Dynamic Queue Creation is enabled for a queue. A queue with
+ * auto queue creation enabled acts as a parent even though it currently has no
+ * static child queues, so it must be selectable as a parent queue in
placement rules.
+ */
+function hasAutoQueueCreation(
+ queue: QueueInfo,
+ getQueuePropertyValue?: QueuePropertyAccessor,
+): boolean {
+ const eligibility = queue.autoCreationEligibility;
+ if (
+ eligibility === AUTO_CREATION_PROPS.ELIGIBILITY_FLEXIBLE ||
+ eligibility === AUTO_CREATION_PROPS.ELIGIBILITY_LEGACY
+ ) {
+ return true;
Review Comment:
Thanks @slfan1989 for the review. I’ve fixed the precedence issue.
--
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]