prestodb/presto · error

UNEXPECTED_ACCUMULO_ERROR

UNEXPECTED_ACCUMULO_ERROR

Error message

Accumulo error when creating BatchWriter and/or Indexer

What it means

Thrown when creating the AccumuloPageSink's BatchWriter or Indexer fails with a generic AccumuloException or AccumuloSecurityException. UNEXPECTED_ACCUMULO_ERROR signals an unexpected Accumulo client/server problem — connection issues, misconfigured connector settings, or authentication/authorization failures — that is not a missing table (that case is handled separately as ACCUMULO_TABLE_DNE).

Source

Thrown at presto-accumulo/src/main/java/com/facebook/presto/accumulo/io/AccumuloPageSink.java:126

            // Create a BatchWriter to the Accumulo table
            BatchWriterConfig conf = new BatchWriterConfig();
            writer = connector.createBatchWriter(table.getFullTableName(), conf);

            // If the table is indexed, create an instance of an Indexer, else empty
            if (table.isIndexed()) {
                indexer = Optional.of(
                        new Indexer(
                                connector,
                                connector.securityOperations().getUserAuthorizations(username),
                                table,
                                conf));
            }
            else {
                indexer = Optional.empty();
            }
        }
        catch (AccumuloException | AccumuloSecurityException e) {
            throw new PrestoException(UNEXPECTED_ACCUMULO_ERROR, "Accumulo error when creating BatchWriter and/or Indexer", e);
        }
        catch (TableNotFoundException e) {
            throw new PrestoException(ACCUMULO_TABLE_DNE, "Accumulo error when creating BatchWriter and/or Indexer, table does not exist", e);
        }
    }

    /**
     * Converts a {@link Row} to an Accumulo mutation.
     *
     * @param row Row object
     * @param rowIdOrdinal Ordinal in the list of columns that is the row ID. This isn't checked at all, so I hope you're right. Also, it is expected that the list of column handles is sorted in ordinal order. This is a very demanding function.
     * @param columns All column handles for the Row, sorted by ordinal.
     * @param serializer Instance of {@link AccumuloRowSerializer} used to encode the values of the row to the Mutation
     * @return Mutation
     */
    public static Mutation toMutation(Row row, int rowIdOrdinal, List<AccumuloColumnHandle> columns, AccumuloRowSerializer serializer)
    {
        // Set our value to the row ID

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Check the nested AccumuloException/AccumuloSecurityException message for the root cause
  2. Validate Presto's Accumulo connector properties (zookeepers, instance name, username, password) and test connectivity with the Accumulo shell
  3. Grant the configured user WRITE (and CREATE if indexing) permissions on the data and index tables: grant Table.WRITE -t table -u user
  4. Confirm network/DNS from the Presto coordinator to ZooKeeper and tablet servers, then retry the write

Example fix

// before
// user lacks write permission on index table
// (sink creation fails with AccumuloSecurityException)
// after
// in Accumulo shell, as root:
grant Table.WRITE -t mydata_index -u presto_user;
grant Table.CREATE -u presto_user;
Defensive patterns

Strategy: try-catch

Validate before calling

// Validate connectivity and permissions before creating a sink
Connector conn = instance.getConnector(user, password);
conn.tableOperations().exists(dataTable); // throws if instance unreachable
conn.securityOperations().hasTablePermission(user, dataTable, TablePermission.WRITE);
conn.securityOperations().hasTablePermission(user, indexTable, TablePermission.WRITE);

Try / catch

try {
    AccumuloPageSink sink = new AccumuloPageSink(...);
} catch (PrestoException e) {
    if (e.getErrorCode().getCode() == StandardErrorCode.UNEXPECTED_ACCUMULO_ERROR.toErrorCode().getCode()
            && e.getCause() instanceof AccumuloSecurityException) {
        throw new RuntimeException("Accumulo credentials/permissions invalid; fix connector auth config", e);
    }
    throw e;
}

Prevention

When it happens

Trigger: Constructing AccumuloPageSink calls table.getPageSinkWriter()/createIndexer, which create a BatchWriter against the data and index tables; any AccumuloException (connection, configuration, server error) or AccumuloSecurityException (bad credentials/permissions) during this setup throws this error.

Common situations: Wrong ZooKeeper quorum/instance name in Presto's Accumulo properties; expired or invalid Accumulo credentials in the connector config; the Presto Accumulo user lacks WRITE permission on the data or index table; Accumulo instance unreachable from a coordinator/worker network partition.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/54f6ade1f96a486d. Report an issue: GitHub.