Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-11071

AutoCreatedQueueTemplate incorrect wildcard level

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      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:

      int supportedWildcardLevel = Math.min(queuePathMaxIndex - 1,
              MAX_WILDCARD_LEVEL);
      

      Test code to validate the fix:

        @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"));
        }
       

      Attachments

        Issue Links

          Activity

            People

              tdomok Tamas Domok
              tdomok Tamas Domok
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m