apache/cassandra · error · ConfigurationException
Invalid partitioner class
Error message
Invalid partitioner class
What it means
After reading the partitioner name from the config, applyPartitioner() calls FBUtilities.newPartitioner(name) to load and instantiate the class. Any failure — unknown name, class not on the classpath, or a class that is not an IPartitioner — is wrapped and rethrown as 'Invalid partitioner class <name>'.
Source
Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:1847
applyPartitioner(conf);
}
public static void applyPartitioner(Config conf)
{
/* Hashing strategy */
if (conf.partitioner == null)
{
throw new ConfigurationException("Missing directive: partitioner", false);
}
String name = conf.partitioner;
try
{
name = PARTITIONER.getString(conf.partitioner);
partitioner = FBUtilities.newPartitioner(name);
}
catch (Exception e)
{
throw new ConfigurationException("Invalid partitioner class " + name, e);
}
partitionerName = partitioner.getClass().getCanonicalName();
}
private static Pair<DiskAccessMode, Boolean> resolveCommitLogWriteDiskAccessMode(DiskAccessMode providedDiskAccessMode)
{
boolean compressOrEncrypt = getCommitLogCompression() != null || (getEncryptionContext() != null && getEncryptionContext().isEnabled());
boolean directIOSupported = false;
// File.getBlockSize creates directories/files tools may not have permissions for
if (!toolInitialized)
{
try
{
String commitLogLocation = getCommitLogLocation();
if (commitLogLocation == null)
throw new ConfigurationException("commitlog_directory must be specified", false);View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Set the fully-qualified class name: partitioner: org.apache.cassandra.dht.Murmur3Partitioner
- If using a custom partitioner, verify its jar is in lib/ and the class implements org.apache.cassandra.dht.IPartitioner
- Check the wrapped cause exception in the log for ClassNotFoundException vs ClassCastException vs instantiation errors to pinpoint the problem
- Never change the partitioner on an existing cluster with data — restore the original value and consult migration docs instead
Example fix
# before (cassandra.yaml) partitioner: Murmur3Partitioner # after partitioner: org.apache.cassandra.dht.Murmur3Partitioner
Defensive patterns
Strategy: validation
Validate before calling
Class.forName(partitionerName);
Try / catch
try { DatabaseDescriptor.applyPartitioner(conf); } catch (ConfigurationException e) { /* fix class */ } Prevention
- Verify partitioner class exists on classpath
When it happens
Trigger: partitioner in cassandra.yaml names a class that cannot be instantiated: typo (e.g. 'Murmur3Partitioner' without package), third-party partitioner jar absent, or the class does not implement IPartitioner; the catch around FBUtilities.newPartitioner throws ConfigurationException with the offending name appended.
Common situations: Typos or missing fully-qualified class name in cassandra.yaml; custom partitioner jar not shipped in lib/; using a partitioner removed or repackaged in a newer Cassandra version.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Missing directive: partitioner
- Unable to read reserved keywords file '%s'
- Token must be >= 0 and <= 2**127
- SASI only supports Murmur3Partitioner.
- Partitioner does not match validation metadata
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/c3583a0e37d08bdf.
Report an issue: GitHub.