prestodb/presto · error · PrestoException
ACCUMULO_TABLE_DNE
ACCUMULO_TABLE_DNE
Error message
Failed to set locality groups, table does not exist
What it means
In setLocalityGroups, when Accumulo throws TableNotFoundException the connector throws ACCUMULO_TABLE_DNE 'Failed to set locality groups, table does not exist', meaning the qualified table name passed to Accumulo does not correspond to any existing physical table.
Source
Thrown at presto-accumulo/src/main/java/com/facebook/presto/accumulo/AccumuloTableManager.java:108
throw new PrestoException(ACCUMULO_TABLE_EXISTS, "Accumulo table already exists", e);
}
}
public void setLocalityGroups(String tableName, Map<String, Set<Text>> groups)
{
if (groups.isEmpty()) {
return;
}
try {
connector.tableOperations().setLocalityGroups(tableName, groups);
LOG.debug("Set locality groups for %s to %s", tableName, groups);
}
catch (AccumuloException | AccumuloSecurityException e) {
throw new PrestoException(UNEXPECTED_ACCUMULO_ERROR, "Failed to set locality groups", e);
}
catch (TableNotFoundException e) {
throw new PrestoException(ACCUMULO_TABLE_DNE, "Failed to set locality groups, table does not exist", e);
}
}
public void setIterator(String table, IteratorSetting setting)
{
try {
// Remove any existing iterator settings of the same name, if applicable
Map<String, EnumSet<IteratorScope>> iterators = connector.tableOperations().listIterators(table);
if (iterators.containsKey(setting.getName())) {
connector.tableOperations().removeIterator(table, setting.getName(), iterators.get(setting.getName()));
}
connector.tableOperations().attachIterator(table, setting);
}
catch (AccumuloSecurityException | AccumuloException e) {
throw new PrestoException(UNEXPECTED_ACCUMULO_ERROR, "Failed to set iterator on table " + table, e);
}
catch (TableNotFoundException e) {View on GitHub (pinned to 55bb57d202)
Solutions
- Verify the table exists in Accumulo shell ('tables list | grep <table>') and create it first if missing.
- Check the fully qualified table name (namespace.table) matches exactly, including namespace.
- Ensure table creation completed successfully before configuring locality groups (order of operations in setup).
- Recreate the table if it was dropped unintentionally, then reapply locality groups.
Example fix
// Accumulo shell: // before: table never created, setLocalityGroups fails createtable myschema.orders // then re-run the Presto CREATE TABLE / table setup so groups apply
Defensive patterns
Strategy: validation
Validate before calling
// Confirm the physical table exists before configuring it:
String qualified = schema + "." + table;
if (!conn.tableOperations().exists(qualified)) {
conn.tableOperations().create(qualified); // or abort setup — never configure a missing table
} Try / catch
try {
tableManager.setLocalityGroups(tableName, groups);
} catch (PrestoException e) {
if (e.getErrorCode().getName().equals("ACCUMULO_TABLE_DNE")) {
// create the table first (or fix the qualified name), then retry
}
throw e;
} Prevention
- Always call tableOperations().exists() before configuring a table.
- Run table setup steps strictly in order: create table, then set locality groups/iterators.
- Use exact namespace-qualified names everywhere; avoid ad-hoc name construction.
- Alert on table drops so downstream configuration steps don't target missing tables.
When it happens
Trigger: Calling setLocalityGroups for a table that was dropped, was never created, or whose namespace-qualified name doesn't match the physical Accumulo table (e.g. wrong namespace prefix or case).
Common situations: CREATE TABLE failed partway so locality groups run before the table exists; table dropped by another process between creation and configuration; namespace mismatch after renaming schemas; typo in the table name.
Related errors
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/2e1271df4cb11232.
Report an issue: GitHub.