apache/cassandra · critical · ConfigurationException
Missing directive: partitioner
Error message
Missing directive: partitioner
What it means
DatabaseDescriptor.applyPartitioner() requires cassandra.yaml to name a partitioner class (e.g. Murmur3Partitioner) because every token and row key hash depends on it. A null conf.partitioner is a fatal ConfigurationException; the node cannot start without knowing how to hash partition keys.
Source
Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:1837
public static void applyLocator()
{
initializationLocator = new Locator(RegistrationStatus.instance,
FBUtilities.getBroadcastAddressAndPort(),
initialLocationProvider);
}
// definitely not safe for tools + clients - implicitly instantiates schema
public static void applyPartitioner()
{
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());View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Add partitioner: org.apache.cassandra.dht.Murmur3Partitioner to cassandra.yaml (the standard choice)
- If a tool generates your yaml, ensure the partitioner key is emitted; re-add it if stripped
- Check that any ${...} substitution in the yaml actually resolves to a non-empty value
Example fix
# before (cassandra.yaml) # partitioner line missing # after partitioner: org.apache.cassandra.dht.Murmur3Partitioner
Defensive patterns
Strategy: validation
Validate before calling
if (yaml.get("partitioner") == null || String.valueOf(yaml.get("partitioner")).isBlank())
throw new IllegalStateException("cassandra.yaml must set partitioner, e.g. org.apache.cassandra.dht.Murmur3Partitioner"); Try / catch
try {
DatabaseDescriptor.applyPartitioner(conf);
} catch (ConfigurationException e) {
if (e.getMessage().equals("Missing directive: partitioner")) {
// add partitioner: org.apache.cassandra.dht.Murmur3Partitioner to cassandra.yaml
} else throw e;
} Prevention
- Always include partitioner: org.apache.cassandra.dht.Murmur3Partitioner in every yaml
- Never change the partitioner value on an existing cluster — verify it matches your data
- Run config linters on generated/templated yaml to catch dropped keys
When it happens
Trigger: cassandra.yaml omits the partitioner directive or sets partitioner: (empty), so conf.partitioner == null when applyPartitioner runs at startup.
Common situations: Hand-trimmed or auto-generated cassandra.yaml missing the partitioner line; environment variable/config substitution wiping the value; copying a minimal yaml that assumes defaults.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- %s has authorization enabled which requires %s to enable aut
- %s requires %s
- %s can't be used with %s
- %s does not support %s
- Failed to instantiate %s
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/14251c296f9d0230.
Report an issue: GitHub.