brumi1024 commented on code in PR #8674:
URL: https://github.com/apache/hadoop/pull/8674#discussion_r3811969819


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-capacity-scheduler-ui/src/main/webapp/src/utils/templateUtils.ts:
##########
@@ -45,3 +49,85 @@ export function isTemplateQueuePath(queuePath: string): 
boolean {
     queuePath.includes(marker),
   );
 }
+
+export type QueuePropertyLookup = (
+  queuePath: string,
+  property: string,
+) => {
+  value: string;
+  isStaged: boolean;
+};
+
+export type ResolvedQueueCapacityConfig = {
+  capacityConfig: string;
+  maxCapacityConfig: string;
+};
+
+const isAutoCreationEnabled = (
+  getQueuePropertyValue: QueuePropertyLookup,
+  queuePath: string,
+  property: string,
+): boolean => getQueuePropertyValue(queuePath, property).value.trim() === 
'true';
+
+/**
+ * Resolves the template queue path for an auto-created child queue based on 
the
+ * parent's auto-creation settings:
+ * - flexible v2 (`auto-queue-creation-v2.enabled`) → leaf-template
+ * - legacy (`auto-create-child-queue.enabled`) → leaf-queue-template

Review Comment:
   I agree with @pan3793's comment. This doesn't seem to handle 
parent-template, template and wildcard scenarios. See the docs about flexible 
AQC: 
https://github.com/apache/hadoop/blob/7f491908020e7dccc6fcdad3574e0fd0b6af2b2c/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/CapacityScheduler.md?plain=1#L815



-- 
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]

Reply via email to