prestodb/presto · error · PrestoException
UNEXPECTED_ACCUMULO_ERROR
UNEXPECTED_ACCUMULO_ERROR
Error message
Failed to check for existence or create Accumulo namespace
What it means
AccumuloTableManager.ensureNamespace checks whether the table's schema (namespace, if not 'default') exists and creates it when missing. Any AccumuloException or AccumuloSecurityException in that check/create is wrapped as UNEXPECTED_ACCUMULO_ERROR; a benign race (NamespaceExistsException) is intentionally suppressed with a warning.
Source
Thrown at presto-accumulo/src/main/java/com/facebook/presto/accumulo/AccumuloTableManager.java:68
{
this.connector = requireNonNull(connector, "connector is null");
}
/**
* Ensures the given Accumulo namespace exist, creating it if necessary
*
* @param schema Presto schema (Accumulo namespace)
*/
public void ensureNamespace(String schema)
{
try {
// If the table schema is not "default" and the namespace does not exist, create it
if (!schema.equals(DEFAULT) && !connector.namespaceOperations().exists(schema)) {
connector.namespaceOperations().create(schema);
}
}
catch (AccumuloException | AccumuloSecurityException e) {
throw new PrestoException(UNEXPECTED_ACCUMULO_ERROR, "Failed to check for existence or create Accumulo namespace", e);
}
catch (NamespaceExistsException e) {
// Suppress race condition between test for existence and creation
LOG.warn("NamespaceExistsException suppressed when creating " + schema);
}
}
public boolean exists(String table)
{
return connector.tableOperations().exists(table);
}
public void createAccumuloTable(String table)
{
try {
connector.tableOperations().create(table);
}
catch (AccumuloException | AccumuloSecurityException e) {View on GitHub (pinned to 55bb57d202)
Solutions
- Grant the connector's Accumulo user the CREATE namespace permission: 'grant Namespace.CREATE -ns <schema> -u presto' (or System.CREATE).
- Pre-create the namespace manually in the Accumulo shell: 'createnamespace <schema>'.
- Check Accumulo master/monitor logs for the underlying AccumuloException cause.
- Validate the schema name is a legal Accumulo namespace identifier (no illegal characters).
Example fix
// Accumulo shell, as root: // before: presto user cannot create namespaces system permission -u presto -s // after createnamespace myschema grant Namespace.CREATE -ns myschema -u presto
Defensive patterns
Strategy: validation
Validate before calling
// Ensure the namespace exists (or is creatable) before table creation:
if (!"default".equals(schema) && !conn.namespaceOperations().exists(schema)) {
conn.namespaceOperations().create(schema); // run with an admin user or pre-create it
} Try / catch
try {
tableManager.ensureNamespace(schema);
} catch (PrestoException e) {
if (e.getErrorCode().getName().equals("UNEXPECTED_ACCUMULO_ERROR")) {
// grant Namespace.CREATE to the connector user or pre-create the namespace, then retry
}
throw e;
} Prevention
- Pre-create all needed namespaces in the Accumulo shell before deploying the catalog.
- Grant the connector user Namespace.CREATE permission up front.
- Validate schema names as legal Accumulo namespace identifiers.
- Monitor Accumulo master availability; ensureNamespace fails when the cluster is degraded.
When it happens
Trigger: Creating a Presto table in a schema whose Accumulo namespace does not exist, when the namespaceOperations().exists() call or create() fails due to a permissions problem, ZooKeeper/master error, or another Accumulo-level failure.
Common situations: Accumulo user lacks Namespace.CREATE permission; namespace created concurrently in a rare non-race failure; Accumulo master unavailable; schema name invalid as an Accumulo namespace identifier.
Understand the failure class
Background: "You do not have permission" / 403 Forbidden errors: authenticated but not allowed — causes and fixes across open-source libraries — this error's family across 31 libraries.
Related errors
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/780ec7c08b8d9770.
Report an issue: GitHub.