Tamas Domok created YARN-11071:
----------------------------------
Summary: AutoCreatedQueueTemplate incorrect wildcard level
Key: YARN-11071
URL: https://issues.apache.org/jira/browse/YARN-11071
Project: Hadoop YARN
Issue Type: Bug
Components: capacity scheduler
Affects Versions: 3.4.0
Reporter: Tamas Domok
Assignee: Tamas Domok
AutoCreatedQueueTemplate calculates wrong wildcard level so a *root.** wildcard
won't match for a *root.queue* for example.
Here the min should be min(queuePathMaxIndex, MAX_WILDCARD_LEVEL), instead of
this:
{code:java}
int supportedWildcardLevel = Math.min(queuePathMaxIndex - 1,
MAX_WILDCARD_LEVEL);
{code}
Test code to validate the fix:
{code:java}
@Test
public void testWildcardAfterRoot() {
conf.set(getTemplateKey("root.*", "acl_submit_applications"), "user");
AutoCreatedQueueTemplate template =
new AutoCreatedQueueTemplate(conf, new QueuePath("root.a"));
template.setTemplateEntriesForChild(conf, "root.a");
Assert.assertEquals("acl_submit_applications is set", "user",
template.getTemplateProperties().get("acl_submit_applications"));
}
{code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]