prestodb/presto · error · PrestoException
ACCUMULO_TABLE_DNE
ACCUMULO_TABLE_DNE
Error message
Table %s does not exist
What it means
Thrown by AccumuloClient.renameTable when a RENAME TABLE statement targets a source Accumulo table that does not exist in the Accumulo instance. Before performing any rename, the connector validates the old table via tableManager.exists(oldTable.getFullTableName()); if it is absent, the rename is aborted with ACCUMULO_TABLE_DNE. This is a metadata-level check, so the table is missing either because it was never created, was dropped, or the schema/table name was mistyped.
Source
Thrown at presto-accumulo/src/main/java/com/facebook/presto/accumulo/AccumuloClient.java:489
}
AccumuloTable oldTable = getTable(oldName);
if (oldTable == null) {
throw new TableNotFoundException(oldName);
}
AccumuloTable newTable = new AccumuloTable(
oldTable.getSchema(),
newName.getTableName(),
oldTable.getColumns(),
oldTable.getRowId(),
oldTable.isExternal(),
oldTable.getSerializerClassName(),
oldTable.getScanAuthorizations());
// Validate table existence
if (!tableManager.exists(oldTable.getFullTableName())) {
throw new PrestoException(ACCUMULO_TABLE_DNE, format("Table %s does not exist", oldTable.getFullTableName()));
}
if (tableManager.exists(newTable.getFullTableName())) {
throw new PrestoException(ACCUMULO_TABLE_EXISTS, format("Table %s already exists", newTable.getFullTableName()));
}
// Rename index tables (which will also validate table existence)
renameIndexTables(oldTable, newTable);
// Rename the Accumulo table
tableManager.renameAccumuloTable(oldTable.getFullTableName(), newTable.getFullTableName());
// We'll then create the metadata
metaManager.deleteTableMetadata(oldTable.getSchemaTableName());
metaManager.createTableMetadata(newTable);
}
/**View on GitHub (pinned to 55bb57d202)
Solutions
- Verify the source table exists: run 'SHOW TABLES FROM old_schema' in Presto or 'tables' in the Accumulo shell for the configured namespace.
- Recreate the missing table (CREATE TABLE) or restore it before retrying the rename.
- Confirm the AccumuloClient configuration (instance, zookeepers, username, namespace) points at the Accumulo instance that actually holds the table.
- Check for name typos or case differences in the qualified table name used in the RENAME statement.
Example fix
// before: renaming a table that was dropped out-of-band ALTER TABLE myschema.events RENAME TO events_old; // after: recreate or verify first SHOW TABLES FROM myschema; -- confirm 'events' exists ALTER TABLE myschema.events RENAME TO events_old;
Defensive patterns
Strategy: validation
Validate before calling
// Presto: confirm the source table exists before renaming
String sql = "SELECT table_name FROM information_schema.tables " +
"WHERE table_schema = 'myschema' AND table_name = 'events'";
boolean exists = !new PrestoStatementRunner(connector).queryForRows(sql).isEmpty();
if (!exists) throw new IllegalStateException("Cannot rename: myschema.events does not exist"); Try / catch
try {
run("ALTER TABLE myschema.events RENAME TO events_old");
} catch (QueryFailedException e) {
if (e.getMessage().contains("does not exist")) {
log.warn("Source table missing; skipping rename");
} else {
throw e;
}
} Prevention
- Never drop Accumulo tables directly in the Accumulo shell; use Presto DROP TABLE so connector metadata stays consistent.
- Run SHOW TABLES FROM <schema> before scripted renames and fail fast if the source is missing.
- Pin each environment's connector config (instance/namespace) so jobs never rename against the wrong Accumulo.
- Log and alert on renames of tables absent from the metastore to catch drift early.
When it happens
Trigger: Calling ALTER TABLE old_schema.old_table RENAME TO new_table (via PrestoQueryRunner/StatementClient) when the source table does not exist in Accumulo: table previously dropped out-of-band, table never created but cached in metadata, wrong connector/catalog, or Accumulo namespace mismatch in the fully-qualified table name.
Common situations: Developers drop the table directly in the Accumulo shell while Presto metadata still lists it; multi-environment setups where the table exists in a dev Accumulo but not prod; typos in schema or table name; cat/connector misconfiguration pointing at a different Accumulo instance or namespace prefix.
Related errors
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/21201431cc0eacef.
Report an issue: GitHub.