apache/cassandra · error · IllegalArgumentException

Invalid specifier in

Error message

Invalid specifier ${spec} in ${describe}: ${input}

What it means

Within AccordExecutor's enum-parameter parsing, each semicolon-part must be comma-separated specifiers of the form 'QueueName:limit'. If a specifier does not split into exactly two colon-separated fields, IllegalArgumentException is thrown naming the offending spec. It validates the per-queue limit syntax before any enum lookup.

Solutions

  1. Format each specifier as <QueueName>:<limit>, e.g. load:8, and comma-separate multiple queues within a group.
  2. Ensure the full value has exactly two semicolon-separated groups (see error 1971).
  3. Quote the property value to prevent shell reinterpretation.

Example fix

// before
-Dcassandra.acord.queue_active_limits=load8;local4
// after
-Dcassandra.acord.queue_active_limits=load:8;local:4
Defensive patterns

Strategy: validation

Validate before calling

for (String part : value.split(";")) for (String spec : part.split(",")) if (!spec.matches("[^:]+:[0-9]+")) throw new IllegalArgumentException("bad specifier: " + spec);

Try / catch

try { parseSpec(spec); } catch (IllegalArgumentException e) { LOG.error("Specifier '{}' rejected: {}", spec, e.getMessage()); }

Prevention

When it happens

Trigger: Passing a specifier without exactly one colon, e.g. 'load8;local:4' or 'load:8:extra;local:4', into the queue active limits property parsed by AccordExecutor.

Common situations: Omitting the limit value or colon; accidental extra colon (IPv6-like or pasted text); shell mangling of characters.

Understand the failure class

Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/1801667500ac187a. Report an issue: GitHub.

Appendix: source

Thrown at src/java/org/apache/cassandra/service/accord/execution/AccordExecutor.java:829

        String[] specs = input.split(";");
        if (specs.length != 2)
            throw new IllegalArgumentException("Invalid specifiers in " + describe + "; expect [GlobalGroup];[ExclusiveGroup] but got: " + input);
        long[] result = new long[2];
        result[0] = parseEnumParams(GlobalGroup::valueOf, specs[0], describe + " for GlobalGroup");
        result[1] = parseEnumParams(ExclusiveGroup::valueOf, specs[1], describe + " for ExclusiveGroup");
        return result;
    }

    private static long parseEnumParams(Function<String, ? extends Enum<?>> get, String input, String describe)
    {
        long result = 0;
        for (String spec : input.split(","))
        {
            if (spec.trim().isEmpty()) continue;

            String[] split = spec.split(":");
            if (split.length != 2)
                throw new IllegalArgumentException("Invalid specifier " + spec + " in " + describe + ": " + input);

            try
            {
                Enum<?> queue = get.apply(split[0]);
                long value = Long.parseLong(split[1]);
                if (value <= 0 || value >= 128)
                    throw new IllegalArgumentException("Invalid limit " + value + " in queue_active_limits: " + input);

                result |= value << (queue.ordinal() * 8);
            }
            catch (Throwable t)
            {
                throw new IllegalArgumentException("Invalid queue identifier " + split[0] + " in " + describe + ": " + input);
            }
        }

        return result;
    }

View on GitHub (pinned to 88fd0f6a0e)