apache/cassandra · error · ConfigurationException

Selected sstable format '%s' is not available.

Error message

Selected sstable format '%s' is not available.

What it means

getAndValidateWriteFormat resolves the configured write format name against the registry of instantiated sstable formats; if the name is blank it defaults to BigFormat, and if the selected name has no registered format this ConfigurationException is thrown. It guarantees the node never starts with a write format that cannot be produced.

Source

Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:1969

        }
        ImmutableMap<String, Supplier<SSTableFormat<?, ?>>> providers = providersBuilder.build();
        if (options != null)
        {
            Sets.SetView<String> unknownFormatNames = Sets.difference(options.keySet(), providers.keySet());
            if (!unknownFormatNames.isEmpty())
                throw new ConfigurationException(String.format("Configuration contains options of unknown sstable formats: %s", unknownFormatNames));
        }
        return providers;
    }

    private static SSTableFormat<?, ?> getAndValidateWriteFormat(Map<String, SSTableFormat<?, ?>> sstableFormats, String selectedFormatName)
    {
        SSTableFormat<?, ?> selectedFormat;
        if (StringUtils.isBlank(selectedFormatName))
            selectedFormatName = BigFormat.NAME;
        selectedFormat = sstableFormats.get(selectedFormatName);
        if (selectedFormat == null)
            throw new ConfigurationException(String.format("Selected sstable format '%s' is not available.", selectedFormatName));

        getStorageCompatibilityMode().validateSstableFormat(selectedFormat);

        return selectedFormat;
    }

    private static void applyCompatibilityMode()
    {
        if (isClientInitialized())
            // tools or clients should not limit the sstable formats they support
            storageCompatibilityMode = StorageCompatibilityMode.NONE;
        else if (conf != null && conf.storage_compatibility_mode != null)
            storageCompatibilityMode = conf.storage_compatibility_mode;
    }

    private static void applySSTableFormats()
    {
        ServiceLoader<SSTableFormat.Factory> loader = ServiceLoader.load(SSTableFormat.Factory.class, DatabaseDescriptor.class.getClassLoader());

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Set sstable_formats.selected_format to a registered format name ('big' or 'bti'), or remove the property to default to 'big'
  2. Check startup logs / DatabaseDescriptor's registered format list to see which formats are actually available
  3. Verify the format's jar is on the classpath if it is a third-party format

Example fix

// before (cassandra.yaml)
sstable_formats:
  selected_format: btx
// after
sstable_formats:
  selected_format: bti
Defensive patterns

Strategy: validation

Validate before calling

String fmt = conf.sstable_formats != null ? conf.sstable_formats.selected_format : null;
if (fmt != null && !Set.of("big","bti").contains(fmt))
    throw new IllegalArgumentException("selected_format not available: " + fmt);

Try / catch

try { DatabaseDescriptor.daemonInitialization(); }
catch (ConfigurationException e) {
    if (e.getMessage().contains("is not available"))
        log.error("Fix sstable_formats.selected_format in cassandra.yaml");
}

Prevention

When it happens

Trigger: cassandra.yaml sets sstable_formats.selected_format to a name that was not registered, e.g. 'bti' on a build where bti is absent, or a misspelled name, so sstableFormats.get(selectedFormatName) returns null.

Common situations: Typo in selected_format in cassandra.yaml; enabling a format in config on an edition/build that doesn't include it; storage compatibility mode interactions after upgrade where the format registry differs from config.

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


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