apache/hadoop · error · IllegalArgumentException
ns + "." + IPC_CALLQUEUE_WRRMUX_WEIGHTS_KEY + " must specify
Error message
ns + "." + IPC_CALLQUEUE_WRRMUX_WEIGHTS_KEY + " must specify exactly " + this.numQueues + " weights: one for each priority level."
What it means
When ipc.<port>.callqueue.faircallqueue.multiplexer.weights (ns + '.' + IPC_CALLQUEUE_WRRMUX_WEIGHTS_KEY) is set, the number of comma-separated integers must exactly equal the number of priority queues — one weight per queue. If the counts differ, the constructor throws IllegalArgumentException and the server fails to start. When the key is unset, defaults (powers of two, 2^N) are generated automatically.
Source
Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WeightedRoundRobinMultiplexer.java:70
private final AtomicInteger requestsLeft; // Number of requests left for this queue
private int[] queueWeights; // The weights for each queue
public WeightedRoundRobinMultiplexer(int aNumQueues, String ns,
Configuration conf) {
if (aNumQueues <= 0) {
throw new IllegalArgumentException("Requested queues (" + aNumQueues +
") must be greater than zero.");
}
this.numQueues = aNumQueues;
this.queueWeights = conf.getInts(ns + "." +
IPC_CALLQUEUE_WRRMUX_WEIGHTS_KEY);
if (this.queueWeights.length == 0) {
this.queueWeights = getDefaultQueueWeights(this.numQueues);
} else if (this.queueWeights.length != this.numQueues) {
throw new IllegalArgumentException(ns + "." +
IPC_CALLQUEUE_WRRMUX_WEIGHTS_KEY + " must specify exactly " +
this.numQueues + " weights: one for each priority level.");
}
this.currentQueueIndex = new AtomicInteger(0);
this.requestsLeft = new AtomicInteger(this.queueWeights[0]);
LOG.info("WeightedRoundRobinMultiplexer is being used.");
}
/**
* Creates default weights for each queue. The weights are 2^N.
*/
private int[] getDefaultQueueWeights(int aNumQueues) {
int[] weights = new int[aNumQueues];
int weight = 1; // Start low
for(int i = aNumQueues - 1; i >= 0; i--) { // Start at lowest queueView on GitHub (pinned to 2add963021)
Solutions
- Count your priority levels and provide exactly that many weights, e.g. for 3 queues: ipc.8020.callqueue.faircallqueue.multiplexer.weights=9,4,1.
- Or delete the weights key entirely to accept the default 2^N weights.
- Re-check the value after any change to priority-levels / scheduler priority-levels — the two settings must move together.
Example fix
# before (3 weights but 4 priority levels) ipc.8020.callqueue.priority-levels=4 ipc.8020.callqueue.faircallqueue.multiplexer.weights=9,4,1 # after ipc.8020.callqueue.priority-levels=3 ipc.8020.callqueue.faircallqueue.multiplexer.weights=9,4,1
Defensive patterns
Strategy: validation
Validate before calling
int levels = conf.getInt("ipc." + port + ".callqueue.priority-levels", 4);
int[] weights = conf.getInts("ipc." + port + ".callqueue.faircallqueue.multiplexer.weights");
if (weights.length != 0 && weights.length != levels) {
throw new IllegalArgumentException("weights count " + weights.length
+ " != priority levels " + levels + "; fix config before starting server");
} Prevention
- Treat priority-levels and faircallqueue.multiplexer.weights as one unit: change both or neither (omit weights to get 2^N defaults).
- Add a config linter rule that cross-checks array-length vs level-count for ipc.* keys.
- Test call-queue changes on a staging daemon before fleet rollout — these errors abort startup.
When it happens
Trigger: Setting ipc.8020.callqueue.faircallqueue.multiplexer.weights=9,4,1 while priority-levels is 2 or 4 (count mismatch); editing priority-levels without updating the weights list; extra trailing comma producing an unexpected parsed entry.
Common situations: Call-queue tuning changes where operators change the number of queues but leave the old weights array; copy-pasted configs between services with different port namespaces and different queue counts.
Related errors
- "Requested queues (" + aNumQueues + ") must be greater than
- numLevels must be at least 1
- callqueue.capacity.weights must specify ${priorityLevels} ca
- callqueue.capacity.weights only takes positive weights. ${w}
- Illegal field separator: ${separator}
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/7a81eeb1ca5db107.
Report an issue: GitHub.