apache/cassandra · error · ConfigurationException

is not a parsable int (base10) for

Error message

%s is not a parsable int (base10) for %s

What it means

ConfigurationException raised when the min_sstable_size option value is not a valid base-10 integer. Long.parseLong throws NumberFormatException, which validateOptions translates into a ConfigurationException naming the bad value and the option key. This guards strategy options at table creation/ALTER time.

Solutions

  1. Supply a plain decimal byte count, e.g. min_sstable_size = '52428800'.
  2. Remove the option to use the default 50MB.
  3. Convert human-readable sizes to bytes in the tooling that generates the options.

Example fix

// before
{'min_sstable_size':'50MB'}
// after
{'min_sstable_size':'52428800'}
Defensive patterns

Strategy: validation

Validate before calling

function isValidInt(v) { return /^-?\d+$/.test(v); }
if (!isValidInt(opts.min_sstable_size)) throw new Error('min_sstable_size must be a base-10 integer (bytes)');

Try / catch

try { schema.alterTable(cql); } catch (ConfigurationException e) { if (e.getMessage().contains("not a parsable int")) { /* strip units and retry with a plain integer */ } else throw e; }

Prevention

When it happens

Trigger: CREATE/ALTER TABLE with {'min_sstable_size': '50MB'} or 'abc' or '1e6' — any min_sstable_size that is not a plain base-10 long string.

Common situations: Developers appending human-readable units ('50MB', '5G') that Cassandra does not parse; hex values ('0x1000'); values with underscores or thousands separators.

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


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

Appendix: source

Thrown at src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategyOptions.java:80

        {
            throw new ConfigurationException(String.format("%s is not a parsable float for %s", optionValue, key), e);
        }
    }

    public static Map<String, String> validateOptions(Map<String, String> options, Map<String, String> uncheckedOptions) throws ConfigurationException
    {
        String optionValue = options.get(MIN_SSTABLE_SIZE_KEY);
        try
        {
            long minSSTableSize = optionValue == null ? DEFAULT_MIN_SSTABLE_SIZE : Long.parseLong(optionValue);
            if (minSSTableSize < 0)
            {
                throw new ConfigurationException(String.format("%s must be non negative: %d", MIN_SSTABLE_SIZE_KEY, minSSTableSize));
            }
        }
        catch (NumberFormatException e)
        {
            throw new ConfigurationException(String.format("%s is not a parsable int (base10) for %s", optionValue, MIN_SSTABLE_SIZE_KEY), e);
        }

        double bucketLow = parseDouble(options, BUCKET_LOW_KEY, DEFAULT_BUCKET_LOW);
        double bucketHigh = parseDouble(options, BUCKET_HIGH_KEY, DEFAULT_BUCKET_HIGH);
        if (bucketHigh <= bucketLow)
        {
            throw new ConfigurationException(String.format("%s value (%s) is less than or equal to the %s value (%s)",
                                                           BUCKET_HIGH_KEY, bucketHigh, BUCKET_LOW_KEY, bucketLow));
        }

        uncheckedOptions.remove(MIN_SSTABLE_SIZE_KEY);
        uncheckedOptions.remove(BUCKET_LOW_KEY);
        uncheckedOptions.remove(BUCKET_HIGH_KEY);

        return uncheckedOptions;
    }

    @Override

View on GitHub (pinned to 88fd0f6a0e)