apache/cassandra · error · IllegalArgumentException
Unrecognised option(s) in column spec
Error message
Unrecognised option(s) in column spec: ${spec} What it means
StressProfile.init parses per-column spec maps from the stress YAML. Each column spec may only contain the keys name, population, size, and cluster; any leftover keys cause this IllegalArgumentException listing the unrecognised keys. It exists to catch YAML typos early instead of silently ignoring misconfigured options.
Solutions
- Remove or correct the unrecognised keys listed in the exception message from the column spec in the YAML
- Rename misspelled options to the supported set: name, population, size, cluster
- Check the cassandra-stress profile YAML schema/docs for the correct option names
- Validate the YAML by running a minimal profile before scaling up
Example fix
# before columnspec: clustering: uniform(1..10) name: c1 # after columnspec: cluster: uniform(1..10) name: c1
Defensive patterns
Strategy: validation
Validate before calling
// validate column spec keys before load
Set<String> allowed = Set.of("name","population","size","cluster");
spec.keySet().forEach(k -> { if (!allowed.contains(k)) throw new IllegalArgumentException("bad column spec key: " + k); }); Try / catch
try { profile.init(yaml); } catch (IllegalArgumentException e) { log.error("Profile column spec invalid: {}", e.getMessage()); throw new ConfigException(e); } Prevention
- Keep only name/population/size/cluster keys in each column spec
- Validate YAML against the profile schema before running
- Copy from the official example profile YAMLs
- Run stress with a tiny cluster to smoke-test profile changes
When it happens
Trigger: Calling profile.init(yaml) where a column spec entry in the YAML contains an option other than name/population/size/cluster (e.g. misspelled 'clustering' instead of 'cluster', or stray keys like 'type').
Common situations: Typos in stress YAML column definitions, copying options from other tools, using outdated option names from older cassandra-stress docs, hand-editing profile YAML files.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Missing name argument in column spec
- No bulk read query defined with name
- No query defined with name
- Unrecognised insert option(s)
- Config contains both old and new keys for the same…
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/ffc0ba6a932f9c2d.
Report an issue: GitHub.
Appendix: source
Thrown at tools/stress/src/org/apache/cassandra/stress/StressProfile.java:255
else
{
tableCql = null;
}
columnConfigs = new HashMap<>();
if (yaml.columnspec != null)
{
for (Map<String, Object> spec : yaml.columnspec)
{
lowerCase(spec);
String name = (String) spec.remove("name");
DistributionFactory population = !spec.containsKey("population") ? null : OptionDistribution.get((String) spec.remove("population"));
DistributionFactory size = !spec.containsKey("size") ? null : OptionDistribution.get((String) spec.remove("size"));
DistributionFactory clustering = !spec.containsKey("cluster") ? null : OptionDistribution.get((String) spec.remove("cluster"));
if (!spec.isEmpty())
throw new IllegalArgumentException("Unrecognised option(s) in column spec: " + spec);
if (name == null)
throw new IllegalArgumentException("Missing name argument in column spec");
GeneratorConfig config = new GeneratorConfig(seedStr + name, clustering, size, population);
columnConfigs.put(name, config);
}
}
}
public void maybeCreateSchema(StressSettings settings)
{
if (!schemaCreated)
{
JavaDriverClient client = settings.getJavaDriverClient();
if (keyspaceCql != null)
{
tryView on GitHub (pinned to 88fd0f6a0e)