apache/cassandra · error · IllegalArgumentException
Invalid parameter list for extreme (Weibull) distribution:
Error message
Invalid parameter list for extreme (Weibull) distribution:
What it means
ExtremeImpl.getFactory() parses EXTREME(min..max,shape) specs (Weibull distribution) and throws IllegalArgumentException when the parameter list does not contain exactly 2 entries. Both the range and the shape parameter are required.
Source
Thrown at tools/stress/src/org/apache/cassandra/stress/settings/OptionDistribution.java:279
ExponentialDistribution findBounds = new ExponentialDistribution(1d);
// max probability should be roughly equal to accuracy of (max-min) to ensure all values are visitable,
// over entire range, but this results in overly skewed distribution, so take sqrt
final double mean = (max - min) / findBounds.inverseCumulativeProbability(1d - Math.sqrt(1d/(max-min)));
return new ExpFactory(min, max, mean);
} catch (Exception ignore)
{
throw new IllegalArgumentException("Invalid parameter list for uniform distribution: " + params);
}
}
}
private static final class ExtremeImpl implements Impl
{
@Override
public DistributionFactory getFactory(List<String> params)
{
if (params.size() != 2)
throw new IllegalArgumentException("Invalid parameter list for extreme (Weibull) distribution: " + params);
try
{
String[] bounds = params.get(0).split("\\.\\.+");
final long min = parseLong(bounds[0]);
final long max = parseLong(bounds[1]);
if (min == max)
return new FixedFactory(min);
final double shape = Double.parseDouble(params.get(1));
WeibullDistribution findBounds = new WeibullDistribution(shape, 1d);
// max probability should be roughly equal to accuracy of (max-min) to ensure all values are visitable,
// over entire range, but this results in overly skewed distribution, so take sqrt
final double scale = (max - min) / findBounds.inverseCumulativeProbability(1d - Math.sqrt(1d/(max-min)));
return new ExtremeFactory(min, max, shape, scale);
} catch (Exception ignore)
{
throw new IllegalArgumentException("Invalid parameter list for extreme (Weibull) distribution: " + params);
}
}View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Supply exactly two parameters: EXTREME(min..max,shape), e.g. EXTREME(1..1000,2.5).
- If you only want a range, use UNIFORM(min..max) or EXP(min..max) instead.
- If you intended the quantized variant, use QEXTREME(min..max,shape,quantas) with 3 parameters.
Example fix
// before EXTREME(1..1000) // after EXTREME(1..1000, 2.5)
Defensive patterns
Strategy: validation
Validate before calling
List<String> params = ...; // from EXTREME(...)
if (params.size() != 2)
throw new IllegalArgumentException("EXTREME expects exactly 2 params min..max,shape, got " + params);
Double.parseDouble(params.get(1)); // shape must be numeric Try / catch
try {
DistributionFactory f = extremeImpl.getFactory(params);
} catch (IllegalArgumentException e) {
System.err.println("EXTREME requires (min..max, shape): " + e.getMessage());
} Prevention
- Always include the Weibull shape parameter with EXTREME/extr/weibull.
- Use QEXTREME with 3 params only when quantization is intended.
- Validate arity before invoking getFactory in generated profiles.
When it happens
Trigger: Calling getFactory with 1 parameter ('extr(1..1000)' missing the shape) or 3+ parameters ('extr(1..1000,2,3)'), including empty trailing-comma arguments.
Common situations: Users omitting the required Weibull shape argument because UNIFORM/EXP only need a range, or copying QEXTREME syntax (which takes 3 params) but invoking the plain EXTREME alias.
Understand the failure class
Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.
Related errors
- Invalid parameter list for gaussian distribution:
- Invalid parameter list for quantized extreme (Weibull) distr
- Invalid parameter list for uniform distribution:
- Pull repair can only be performed between two hosts. Please
- No node present with id ${id} in the given cluster metadata.
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/53ef724d764473f7.
Report an issue: GitHub.