apache/hadoop · error · RuntimeException
Improper queue name : {nameValue}
Error message
Improper queue name : {nameValue} What it means
Inside a <queue>, the <name> element must be non-empty after trimming and must not contain the hierarchy separator ':' (NAME_SEPARATOR); otherwise the parser throws this RuntimeException naming the offending value. Hierarchy is expressed by nesting <queues> under a parent queue - the parser builds qualified names itself, so ':' in a name is reserved and rejected.
Source
Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/QueueConfigurationParser.java:279
NodeList fields = queueNode.getChildNodes();
validate(queueNode);
List<Element> subQueues = new ArrayList<Element>();
String submitKey = "";
String adminKey = "";
for (int j = 0; j < fields.getLength(); j++) {
Node fieldNode = fields.item(j);
if (!(fieldNode instanceof Element)) {
continue;
}
Element field = (Element) fieldNode;
if (QUEUE_NAME_TAG.equals(field.getTagName())) {
String nameValue = field.getTextContent();
if (field.getTextContent() == null ||
field.getTextContent().trim().equals("") ||
field.getTextContent().contains(NAME_SEPARATOR)) {
throw new RuntimeException("Improper queue name : " + nameValue);
}
if (!parent.equals("")) {
name += parent + NAME_SEPARATOR;
}
//generate the complete qualified name
//parent.child
name += nameValue;
newQueue.setName(name);
submitKey = toFullPropertyName(name,
QueueACL.SUBMIT_JOB.getAclName());
adminKey = toFullPropertyName(name,
QueueACL.ADMINISTER_JOBS.getAclName());
}
if (QUEUE_TAG.equals(field.getTagName()) && field.hasChildNodes()) {
subQueues.add(field);
}View on GitHub (pinned to 2add963021)
Solutions
- Give every queue a non-empty name without ':'
- Express hierarchy by nesting child <queues> inside the parent <queue>
- Validate names in config review: ^[A-Za-z0-9._-]+$ and no ':'
Example fix
<!-- before -->
<queue>
<name>prod:etl</name> <!-- ':' is the reserved separator -->
</queue>
<!-- after: nested hierarchy, simple names -->
<queue>
<name>prod</name>
<queues>
<queue><name>etl</name></queue>
</queues>
</queue> Defensive patterns
Strategy: validation
Validate before calling
static boolean isValidQueueName(String n) {
return n != null && !n.trim().isEmpty() && !n.contains(":")
&& n.matches("[A-Za-z0-9._-]+");
} Prevention
- Reserve ':' for the parser; keep queue names to letters, digits, '.', '_', '-'
- Encode hierarchy via nested <queues>, never via separators in <name>
- Add a lint rule rejecting empty or separator-containing names
When it happens
Trigger: <name></name> or whitespace-only content inside a queue definition; a hand-flattened hierarchical name like <name>prod:etl</name> instead of nesting child queues.
Common situations: Operators collapsing nested queues into one name; names pasted from other schedulers' configs (which use different separators); empty <name> produced by templating.
Related errors
- Configuration file not found at {confFile}
- No queues defined
- Malformed xml formation queue name not specified
- Only 1 or 2 algorithm version is supported
- value cannot be blank
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/d3937b0e959edef5.
Report an issue: GitHub.