You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-dev@hadoop.apache.org by "Tamas Domok (Jira)" <ji...@apache.org> on 2022/02/01 07:46:00 UTC

[jira] [Created] (YARN-11071) AutoCreatedQueueTemplate incorrect wildcard level

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: yarn-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-dev-help@hadoop.apache.org