apache/hadoop · error · RuntimeException
Malformed xml formation queue tag and acls tags or state ta
Error message
Malformed xml formation queue tag and acls tags or state tags are siblings
What it means
QueueConfigurationParser validates mapred-queues.xml while building the queue hierarchy. A <queue> element that contains nested <queue> children (a parent queue) must not also carry <acl-submit-job>, <acl-administer-jobs>, or <state> tags as direct siblings; those properties are only legal on leaf queues. When both are present the parser throws this RuntimeException, which fails QueueManager initialization and typically prevents JobTracker startup or a queue refresh.
Source
Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/QueueConfigurationParser.java:407
Set<String> siblings = new HashSet<String>();
for (int i = 0; i < fields.getLength(); i++) {
if (!(fields.item(i) instanceof Element)) {
continue;
}
siblings.add((fields.item(i)).getNodeName());
}
if(! siblings.contains(QUEUE_NAME_TAG)) {
throw new RuntimeException(
" Malformed xml formation queue name not specified ");
}
if (siblings.contains(QUEUE_TAG) && (
siblings.contains(ACL_ADMINISTER_JOB_TAG) ||
siblings.contains(ACL_SUBMIT_JOB_TAG) ||
siblings.contains(STATE_TAG)
)) {
throw new RuntimeException(
" Malformed xml formation queue tag and acls " +
"tags or state tags are siblings ");
}
}
private static String getSimpleQueueName(String fullQName) {
int index = fullQName.lastIndexOf(NAME_SEPARATOR);
if (index < 0) {
return fullQName;
}
return fullQName.substring(index + 1, fullQName.length());
}
/**
* Construct an {@link Element} for a single queue, constructing the inner
* queue <name/>, <properties/>, <state/> and the inner
* <queue> elements recursively.View on GitHub (pinned to 2add963021)
Solutions
- Remove <state>, <acl-submit-job>, and <acl-administer-jobs> from every parent <queue> element that nests <queue> children; keep only <name> and the nested queues there.
- Move the ACL and state settings down to the leaf queues that actually accept jobs.
- Re-check the whole file for the same pattern in other parents before restarting, since parsing stops at the first bad queue.
- Restart the JobTracker (or re-run the config load) to confirm the file parses cleanly.
Example fix
<!-- before -->
<queue>
<name>eng</name>
<state>running</state>
<queue>
<name>eng-etl</name>
</queue>
</queue>
<!-- after -->
<queue>
<name>eng</name>
<queue>
<name>eng-etl</name>
<state>running</state>
</queue>
</queue> Defensive patterns
Strategy: validation
Validate before calling
// before deploying mapred-queues.xml: parent queues must not carry acl/state tags
Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File(confDir, "mapred-queues.xml"));
NodeList queues = doc.getElementsByTagName("queue");
for (int i = 0; i < queues.getLength(); i++) {
Element q = (Element) queues.item(i);
boolean hasChildren = q.getElementsByTagName("queue").getLength() > 0;
if (hasChildren) {
for (String bad : new String[]{"state", "acl-submit-job", "acl-administer-jobs"}) {
if (q.getElementsByTagName(bad).getLength() > 0)
throw new IllegalStateException("Parent queue " + q.getElementsByTagName("name").item(0).getTextContent()
+ " must not contain <" + bad + ">; move it to leaf queues");
}
}
} Prevention
- Keep a leaf-queue template and a parent-queue template; parents contain only <name> and nested <queue>.
- Lint mapred-queues.xml in CI with the DOM check above before pushing to config management.
- Document that ACL and state tags are legal only on leaf queues.
When it happens
Trigger: mapred-queues.xml contains a parent queue like <queue><name>a</name><state>running</state><queue><name>a1</name>...</queue></queue>. Loading it via new QueueConfigurationParser(...) or any code path that builds a QueueManager (JobTracker start, refresh-queues) throws.
Common situations: Migrating from a flat queue list to a hierarchical one by copying a leaf-queue template into a parent element; hand-editing mapred-queues.xml without knowing that ACL/state tags are leaf-only; merging queue configs from different clusters.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- No queues defined
- No queues defined
- Malformed xml formation queue name not specified
- Unable to refresh queues because queue-hierarchy changed. Re
- Scheduler's refresh-queues failed with the exception : " + S
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/146ecbe0cf66198e.
Report an issue: GitHub.