{"record":{"id":"ffc0ba6a932f9c2d","repo":"apache/cassandra","slug":"unrecognised-option-s-in-column-spec-spec","errorCode":null,"errorMessage":"Unrecognised option(s) in column spec: ${spec}","messagePattern":"Unrecognised option\\(s\\) in column spec: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"tools/stress/src/org/apache/cassandra/stress/StressProfile.java","lineNumber":255,"sourceCode":"        else\n        {\n            tableCql = null;\n        }\n\n        columnConfigs = new HashMap<>();\n\n        if (yaml.columnspec != null)\n        {\n            for (Map<String, Object> spec : yaml.columnspec)\n            {\n                lowerCase(spec);\n                String name = (String) spec.remove(\"name\");\n                DistributionFactory population = !spec.containsKey(\"population\") ? null : OptionDistribution.get((String) spec.remove(\"population\"));\n                DistributionFactory size = !spec.containsKey(\"size\") ? null : OptionDistribution.get((String) spec.remove(\"size\"));\n                DistributionFactory clustering = !spec.containsKey(\"cluster\") ? null : OptionDistribution.get((String) spec.remove(\"cluster\"));\n\n                if (!spec.isEmpty())\n                    throw new IllegalArgumentException(\"Unrecognised option(s) in column spec: \" + spec);\n                if (name == null)\n                    throw new IllegalArgumentException(\"Missing name argument in column spec\");\n\n                GeneratorConfig config = new GeneratorConfig(seedStr + name, clustering, size, population);\n                columnConfigs.put(name, config);\n            }\n        }\n    }\n\n    public void maybeCreateSchema(StressSettings settings)\n    {\n        if (!schemaCreated)\n        {\n            JavaDriverClient client = settings.getJavaDriverClient();\n\n            if (keyspaceCql != null)\n            {\n                try","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/tools/stress/src/org/apache/cassandra/stress/StressProfile.java#L237-L273","documentation":"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.","triggerScenarios":"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').","commonSituations":"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.","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"],"exampleFix":"# before\ncolumnspec:\n  clustering: uniform(1..10)\n  name: c1\n# after\ncolumnspec:\n  cluster: uniform(1..10)\n  name: c1","handlingStrategy":"validation","validationCode":"// validate column spec keys before load\nSet<String> allowed = Set.of(\"name\",\"population\",\"size\",\"cluster\");\nspec.keySet().forEach(k -> { if (!allowed.contains(k)) throw new IllegalArgumentException(\"bad column spec key: \" + k); });","typeGuard":null,"tryCatchPattern":"try { profile.init(yaml); } catch (IllegalArgumentException e) { log.error(\"Profile column spec invalid: {}\", e.getMessage()); throw new ConfigException(e); }","preventionTips":["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"],"tags":["yaml","configuration","cassandra-stress"],"backgroundTag":"invalid-config-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}