apache/cassandra · error · java.lang.IllegalArgumentException
Unknown sstable format
Error message
Unknown sstable format: %s
What it means
DatabaseDescriptor.setSelectedSSTableFormat(String) looks up the named format in the registered sstable format table and throws IllegalArgumentException when no format with that name exists. SSTable formats must be registered before they can be selected.
Solutions
- Use a registered format name exactly as returned by DatabaseDescriptor.getSSTableFormats() (e.g. via the SSTableFormat instance overload).
- Register/verify the custom format implementation is loaded before selection.
- Check spelling and case of the format name.
Example fix
// before
DatabaseDescriptor.setSelectedSSTableFormat("BIG"); // not registered by that name
// after
DatabaseDescriptor.setSelectedSSTableFormat("bti"); Defensive patterns
Strategy: validation
Validate before calling
if (DatabaseDescriptor.getSSTableFormats().containsKey(name)) DatabaseDescriptor.setSelectedSSTableFormat(name);
Type guard
boolean isKnownSSTableFormat(String name) { return DatabaseDescriptor.getSSTableFormats().containsKey(name); } Try / catch
try { DatabaseDescriptor.setSelectedSSTableFormat(name); } catch (IllegalArgumentException e) { log.error("unknown sstable format: " + name, e); } Prevention
- Copy format names exactly from getSSTableFormats() key set.
- Ensure custom format plugins are registered before selection.
- Watch case sensitivity in format names.
When it happens
Trigger: Calling setSelectedSSTableFormat("big") or any name not present in getSSTableFormats(); typically via @VisibleForTesting paths or config that specifies an sstable_format name that is not registered.
Common situations: Typos in the format name (case-sensitive lookup); attempting to select a pluggable format whose jar is not on the classpath/registered; tests referencing format names from a different Cassandra version.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Cannot create CompressionParams for stored parameters
- Component is not present in the manifest
- Configuration contains options of unknown sstable formats
- denylist_max_keys_per_table must be a positive integer.
- denylist_max_keys_total must be a positive integer.
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/6dd80e5fe56b97a9.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:6162
applySSTableFormats(factories, config);
}
public static ImmutableMap<String, SSTableFormat<?, ?>> getSSTableFormats()
{
return Objects.requireNonNull(sstableFormats, "Forgot to initialize DatabaseDescriptor?");
}
public static SSTableFormat<?, ?> getSelectedSSTableFormat()
{
return Objects.requireNonNull(selectedSSTableFormat, "Forgot to initialize DatabaseDescriptor?");
}
@VisibleForTesting
public static void setSelectedSSTableFormat(String name)
{
SSTableFormat<?, ?> format = getSSTableFormats().get(name);
if (format == null)
throw new IllegalArgumentException("Unknown sstable format: " + name);
setSelectedSSTableFormat(format);
}
@VisibleForTesting
public static void setSelectedSSTableFormat(SSTableFormat<?, ?> format)
{
selectedSSTableFormat = Objects.requireNonNull(format);
}
public static boolean getDynamicDataMaskingEnabled()
{
return conf.dynamic_data_masking_enabled;
}
public static void setDynamicDataMaskingEnabled(boolean enabled)
{
if (enabled != conf.dynamic_data_masking_enabled)
{View on GitHub (pinned to 88fd0f6a0e)