brumi1024 commented on code in PR #8674:
URL: https://github.com/apache/hadoop/pull/8674#discussion_r3813056839
##########
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:
The issue is that we cannot solely rely on the leaf-template. AQCv2's
template handling logic takes multiple values into account (template,
wildcards, leaf-template), and this change assumes that nothing else matters.
See in my comment below:
https://github.com/apache/hadoop/pull/8674#issuecomment-5341896606
--
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]