Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.7.0
Description
Yarn Queue manager is allowing to Create a Child Queue for queue-mappings enabled Queue and Save the changes
But the Operating is Failing as Yarn is having a check that Queue-mappings should only be allowed for Leaf queue
Code which validates whether queue-mappings are enabled only for leaf-queue ( YARN CODE)
private static QueueMapping validateAndGetQueueMapping( CapacitySchedulerQueueManager queueManager, CSQueue queue, QueueMapping mapping, QueuePath queuePath) throws IOException { if (!(queue instanceof LeafQueue)) { throw new IOException( "mapping contains invalid or non-leaf queue : " + mapping.getQueue()); }
The buggy code in [Ambari Yarn Queue Manager which needs rework]:
hasInvalidMapping = queues.filter(function(queue){ return !queue.get("queues"); //get all leaf queues }).map(function(queue){ return queue.get("name"); }).indexOf(mapping[2]) == -1;