{"record":{"id":"ffde6e11d16eb1b4","repo":"apache/cassandra","slug":"unknown-compressor-key-s-in-compressor-provider","errorCode":null,"errorMessage":"Unknown compressor key '%s' in compressor_providers. Expected a built-in compressor's fully qualified class name, simple class name, or abbreviation: %s","messagePattern":"Unknown compressor key '(.+?)' in compressor_providers\\. Expected a built-in compressor's fully qualified class name, simple class name, or abbreviation: (.+?)","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/io/compress/CompressorRegistry.java","lineNumber":227,"sourceCode":"     * @throws ConfigurationException if a provider fails to initialize and fallback is not enabled\n     */\n    public void registerProviders(Map<String, ParameterizedClass> providerOptions)\n    {\n        if (providerOptions == null)\n            return;\n\n        Set<String> validKeys = new HashSet<>();\n        for (CompressorType type : CompressorType.values())\n        {\n            validKeys.add(type.compressorClassName);\n            validKeys.add(type.simpleName);\n            validKeys.add(type.abbreviation);\n        }\n\n        for (String key : providerOptions.keySet())\n        {\n            if (!validKeys.contains(key))\n                throw new ConfigurationException(\"Unknown compressor key '\" + key + \"' in compressor_providers. \" +\n                                                 \"Expected a built-in compressor's fully qualified class name, simple class name, \" +\n                                                 \"or abbreviation: \" + validKeys);\n        }\n\n        for (CompressorType type : CompressorType.values())\n        {\n            ParameterizedClass providerConfig = findProviderConfig(providerOptions, type);\n            if (providerConfig == null)\n            {\n                compressionProviders.put(type.compressorClassName, DEFAULT_COMPRESSION_PROVIDER);\n            }\n            else\n            {\n                AbstractCompressionProvider provider = resolveProvider(providerConfig);\n                compressionProviders.put(type.compressorClassName, provider);\n                logger.info(\"Adding '{}' provider for '{}'\", provider.getClass().getName(), type.compressorClassName);\n            }\n        }","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/io/compress/CompressorRegistry.java#L209-L245","documentation":"registerProviders() validates every key in the compressor_providers map against the set of built-in compressor identifiers: fully qualified class names, simple class names, and abbreviations. Any key outside this set is rejected because there is no built-in algorithm it could configure a provider for. This prevents typos and unsupported algorithms from being silently ignored at startup.","triggerScenarios":"Calling CompressorRegistry.registerProviders(Map<String, ParameterizedClass>) (or setting compressor_providers in cassandra.yaml) with a key that is not a built-in compressor's FQCN, simple name, or abbreviation — e.g. 'brotli', 'LZ4Compressor ' with trailing space, or 'lz4hc'.","commonSituations":"Typos like 'LZ' instead of 'LZ4'; adding a third-party algorithm key assuming providers can register new algorithms; copying keys from documentation of a different Cassandra version with different abbreviations; extra whitespace or case errors like 'lz4' vs 'LZ4'.","solutions":["Change the key to a valid built-in identifier: the FQCN (e.g. org.apache.cassandra.io.compress.LZ4Compressor), the simple name (LZ4Compressor), or the abbreviation (LZ4) as listed in the exception message.","Check the exception's validKeys list and copy the exact spelling from it.","If you need an algorithm not in the list, you cannot add it via compressor_providers; use a compression provider that substitutes a built-in class instead.","Strip stray whitespace and fix casing in the YAML key."],"exampleFix":"// before\ncassandra.yaml: compressor_providers: { brotli: { class_name: com.example.BrotliProvider } }\n// after\ncassandra.yaml: compressor_providers: { LZ4: { class_name: com.example.BrotliProvider } }","handlingStrategy":"validation","validationCode":"Set<String> valid = new HashSet<>();\nfor (CompressorType t : CompressorType.values()) { valid.add(t.compressorClassName); valid.add(t.simpleName); valid.add(t.abbreviation); }\nfor (String key : providerOptions.keySet()) if (!valid.contains(key)) throw new IllegalArgumentException(\"Unknown compressor key: \" + key);","typeGuard":null,"tryCatchPattern":"try {\n    registry.registerProviders(cfg.compressorProviders);\n} catch (ConfigurationException e) {\n    if (e.getMessage().startsWith(\"Unknown compressor key\")) log.error(\"Fix compressor_providers key; valid: {}\", e.getMessage());\n    throw e;\n}","preventionTips":["Copy compressor keys exactly from CompressorType values (FQCN, simple name, or abbreviation)","Trim whitespace and match casing in cassandra.yaml keys","Do not invent new algorithm keys; compressor_providers only configures providers for built-in algorithms","Validate the YAML against the valid key list before deploying"],"tags":["configuration","compression","validation"],"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-14T16:17:12.679Z"}