apache/cassandra · error · RuntimeException
You must supply a table name
Error message
You must supply a table name
What it means
parseEntitiesForSnapshot throws RuntimeException('You must supply a table name') when the table portion of a 'keyspace.table' entity string is null. Like the keyspace check, this validates the split tokens before resolving Keyspace and ColumnFamilyStore; an actual nonexistent table is rejected later by getColumnFamilyStore instead.
Solutions
- Pass the full 'keyspace.table' name with a non-empty table part.
- Check the table variable in the calling script for emptiness/null before invoking.
- Use 'keyspace.*' or omit the entity entirely to snapshot all tables in a keyspace rather than a malformed name.
Example fix
// before String entity = "keyspace1."; // empty table part // after String entity = "keyspace1.users";
Defensive patterns
Strategy: validation
Validate before calling
int dot = entity.indexOf('.');
String table = entity.substring(dot + 1);
if (table.isEmpty()) throw new IllegalArgumentException("Empty table in entity " + entity); Try / catch
try { takeSnapshot(entities); } catch (RuntimeException e) { if (e.getMessage().equals("You must supply a table name")) throw new IllegalArgumentException("Missing table in entity " + entities, e); throw e; } Prevention
- Interpolate table names with a guard against empty strings
- Validate each entity against ^[^.]+\.[^.]+$ before invocation
- Use keyspace-level snapshots when targeting all tables
When it happens
Trigger: Snapshot entity arguments of the form 'keyspace.' or with a null table token reaching the length==2 branch, e.g. via programmatic/JMX takeSnapshot calls with malformed entity strings.
Common situations: Scripts interpolating an empty/unset table variable into 'ks.$table'; hand-built JMX entity lists; copy-pasted commands dropping the table after the dot.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Cannot take a snapshot on secondary index or invalid column…
- You must supply a keyspace name
- A range supplied to SSTableCursorReader ends before it…
- Argument must have keyspace and table values.
- arguments for -F are json, yaml, table only.
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/194ae88b46ef20e1.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/service/snapshot/TakeSnapshotTask.java:212
private Set<ColumnFamilyStore> parseEntitiesForSnapshot(String... entities)
{
Set<ColumnFamilyStore> entitiesForSnapshot = new HashSet<>();
if (entities != null && entities.length > 0 && entities[0].contains("."))
{
for (String entity : entities)
{
String[] splitted = StringUtils.split(entity, '.');
if (splitted.length == 2)
{
String keyspaceName = splitted[0];
String tableName = splitted[1];
if (keyspaceName == null)
throw new RuntimeException("You must supply a keyspace name");
if (tableName == null)
throw new RuntimeException("You must supply a table name");
Keyspace validKeyspace = Keyspace.getValidKeyspace(keyspaceName);
ColumnFamilyStore existingTable = validKeyspace.getColumnFamilyStore(tableName);
entitiesForSnapshot.add(existingTable);
}
// special case for index which we can not normally create a snapshot for
// but a snapshot is apparently taken before a secondary index is scrubbed,
// so we preserve this behavior
else if (splitted.length == 3)
{
String keyspaceName = splitted[0];
String tableName = splitted[1];
Keyspace validKeyspace = Keyspace.getValidKeyspace(keyspaceName);
ColumnFamilyStore existingTable = validKeyspace.getColumnFamilyStore(tableName);
Index indexByName = existingTable.indexManager.getIndexByName(splitted[2]);
if (indexByName instanceof CassandraIndex)View on GitHub (pinned to 88fd0f6a0e)