{"record":{"id":"cd808f3cda1cddc0","repo":"apache/hadoop","slug":"no-queues-defined-cd808f","errorCode":null,"errorMessage":" No queues defined ","messagePattern":" No queues defined ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/QueueConfigurationParser.java","lineNumber":212,"sourceCode":"        throw new RuntimeException(\"No queues defined \");\n      }\n      NamedNodeMap nmp = queuesNode.getAttributes();\n      Node acls = nmp.getNamedItem(ACLS_ENABLED_TAG);\n\n      if (acls != null) {\n        LOG.warn(\"Configuring \" + ACLS_ENABLED_TAG + \" flag in \" +\n            QueueManager.QUEUE_CONF_FILE_NAME + \" is not valid. \" +\n            \"This tag is ignored. Configure \" +\n            MRConfig.MR_ACLS_ENABLED + \" in mapred-site.xml. See the \" +\n            \" documentation of \" + MRConfig.MR_ACLS_ENABLED +\n            \", which is used for enabling job level authorization and \" +\n            \" queue level authorization.\");\n      }\n\n      NodeList props = queuesNode.getChildNodes();\n      if (props == null || props.getLength() <= 0) {\n        LOG.info(\" Bad configuration no queues defined \");\n        throw new RuntimeException(\" No queues defined \");\n      }\n\n      //We have root level nodes.\n      for (int i = 0; i < props.getLength(); i++) {\n        Node propNode = props.item(i);\n        if (!(propNode instanceof Element)) {\n          continue;\n        }\n\n        if (!propNode.getNodeName().equals(QUEUE_TAG)) {\n          LOG.info(\"At root level only \\\" queue \\\" tags are allowed \");\n          throw\n            new RuntimeException(\"Malformed xml document no queue defined \");\n        }\n\n        Element prop = (Element) propNode;\n        //Add children to root.\n        Queue q = createHierarchy(\"\", prop);","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/QueueConfigurationParser.java#L194-L230","documentation":"The parser accepts the <queues> root only when it has at least one element child; an empty <queues></queues> (or one containing only whitespace text nodes) throws this RuntimeException after the 'Bad configuration no queues defined' log line. Note the leading space in the message - it differs from the wrong-root variant at line 194.","triggerScenarios":"mapred-queues.xml where all <queue> entries were deleted or a templating step stripped the children, leaving zero element nodes under <queues>.","commonSituations":"Queues removed to 'disable' the feature; broken config templating (empty loop generating children); hand-merged conflicts that dropped elements.","solutions":["Keep at least one <queue> with a valid <name> - a 'default' queue is the usual minimum","Restore the file from version control or the packaged default","Re-run the config lint (root element + non-empty children) before restarting services"],"exampleFix":"<!-- before -->\n<queues></queues>\n\n<!-- after -->\n<queues>\n  <queue><name>default</name></queue>\n</queues>","handlingStrategy":"validation","validationCode":"// deploy-time check: <queues> must contain at least one element child\nNodeList children = doc.getDocumentElement().getChildNodes();\nboolean anyQueue = false;\nfor (int i = 0; i < children.getLength(); i++) anyQueue |= children.item(i) instanceof Element;\nif (!anyQueue) throw new IllegalArgumentException(\"mapred-queues.xml defines no queues\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never ship an emptied queues file - keep a 'default' queue","Assert non-empty queue lists in config CI","Version-control queue XML and review deletions in PRs"],"tags":["hadoop","mapreduce","queues","xml","empty-configuration"],"backgroundTag":"empty-configuration","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}