apache/cassandra · error · ConfigurationException

is not a parsable long (base10) for

Error message

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

What it means

The expired_sstables_check_frequency_seconds value is not a parsable base-10 long; the NumberFormatException from Long.parseLong is wrapped in a ConfigurationException. The option accepts only integer seconds.

Solutions

  1. Convert the duration to whole seconds, e.g. '5min' -> '300'.
  2. Use a plain base-10 long with no suffix or separators.
  3. Remove the option to use the default frequency.

Example fix

// before
'expired_sstables_check_frequency_seconds': '5min'
// after
'expired_sstables_check_frequency_seconds': '300'
Defensive patterns

Strategy: validation

Validate before calling

try { Long.parseLong(opts.get("expired_sstables_check_frequency_seconds").trim()); } catch (NumberFormatException e) { /* invalid */ }

Try / catch

try { applyOptions(); } catch (ConfigurationException e) { fixDurationToSeconds(); }

Prevention

When it happens

Trigger: Controller.validateOptions receives a non-numeric or overflowing string for 'expired_sstables_check_frequency_seconds', e.g. '1m', '3.5', or a number larger than Long.MAX_VALUE.

Common situations: Passing durations with unit suffixes ('90s', '5min') that must instead be converted to seconds; JSON/YAML templating inserting quoted decimals.

Understand the failure class

Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.

Related errors


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

Appendix: source

Thrown at src/java/org/apache/cassandra/db/compaction/unified/Controller.java:596

                                                                s,
                                                                MAX_SSTABLES_TO_COMPACT_OPTION),
                                                  e);
             }
        }
        s = options.remove(EXPIRED_SSTABLE_CHECK_FREQUENCY_SECONDS_OPTION);
        if (s != null)
        {
            try
            {
                long expiredSSTableCheckFrequency = Long.parseLong(s);
                if (expiredSSTableCheckFrequency <= 0)
                    throw new ConfigurationException(String.format("Invalid configuration, %s should be positive: %d",
                                                                   EXPIRED_SSTABLE_CHECK_FREQUENCY_SECONDS_OPTION,
                                                                   expiredSSTableCheckFrequency));
            }
            catch (NumberFormatException e)
            {
                throw new ConfigurationException(String.format("%s is not a parsable long (base10) for %s",
                                                               s,
                                                               EXPIRED_SSTABLE_CHECK_FREQUENCY_SECONDS_OPTION),
                                                 e);
            }
        }

        validateBoolean(options, ALLOW_UNSAFE_AGGRESSIVE_SSTABLE_EXPIRATION_OPTION);
        validateBoolean(options, PARALLELIZE_OUTPUT_SHARDS_OPTION);

        s = options.remove(OVERLAP_INCLUSION_METHOD_OPTION);
        if (s != null)
        {
            try
            {
                Overlaps.InclusionMethod.valueOf(toUpperCaseLocalized(s));
            }
            catch (IllegalArgumentException e)
            {

View on GitHub (pinned to 88fd0f6a0e)