prestodb/presto · error

ACCUMULO_TABLE_DNE

ACCUMULO_TABLE_DNE

Error message

Accumulo table does not exist

What it means

PrestoException with code ACCUMULO_TABLE_DNE thrown from Indexer.flush when Accumulo reports TableNotFoundException during flush — the index (or metrics) table expected by the indexer has been dropped or never created. It maps Accumulo's absence signal onto the connector's dedicated table-does-not-exist error code.

Source

Thrown at presto-accumulo/src/main/java/com/facebook/presto/accumulo/index/Indexer.java:304

    {
        try {
            // Flush index writer
            indexWriter.flush();

            // Write out metrics mutations
            BatchWriter metricsWriter = connector.createBatchWriter(table.getMetricsTableName(), writerConfig);
            metricsWriter.addMutations(getMetricsMutations());
            metricsWriter.close();

            // Re-initialize the metrics
            metrics.clear();
            metrics.put(METRICS_TABLE_ROW_COUNT, new AtomicLong(0));
        }
        catch (MutationsRejectedException e) {
            throw new PrestoException(UNEXPECTED_ACCUMULO_ERROR, "Index mutation was rejected by server on flush", e);
        }
        catch (TableNotFoundException e) {
            throw new PrestoException(ACCUMULO_TABLE_DNE, "Accumulo table does not exist", e);
        }
    }

    /**
     * Flushes all remaining mutations via {@link Indexer#flush} and closes the index writer.
     */
    @Override
    public void close()
    {
        try {
            flush();
            indexWriter.close();
        }
        catch (MutationsRejectedException e) {
            throw new PrestoException(UNEXPECTED_ACCUMULO_ERROR, "Mutation was rejected by server on close", e);
        }
    }

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Recreate the missing index/metrics tables or re-run the connector's schema/table registration for this Presto table
  2. Confirm you are connected to the intended Accumulo instance (zookeepers/instance name) where the tables exist
  3. Find what dropped the table (admin job, migration) and prevent it; re-run indexing after recreation
  4. Verify expected table names in the Accumulo shell with 'tables -l' for the connector's namespace

Example fix

// before
indexer.close(); // ACCUMULO_TABLE_DNE if index table was dropped
// after
if (!conn.tableOperations().exists(indexTable)) {
    metadataManager.createAndRegisterTables(); // recreate index + metrics tables
}
indexer.close();
Defensive patterns

Strategy: validation

Validate before calling

// before indexing, confirm index and metrics tables exist in the right instance
if (!conn.tableOperations().exists(indexTable) || !conn.tableOperations().exists(metricsTable)) {
    throw new IllegalStateException("Accumulo index/metrics table missing; re-register schema or recreate tables");
}

Type guard

static boolean isTableMissing(PrestoException e) {
    return e.getCause() instanceof TableNotFoundException;
}

Try / catch

try {
    indexer.close();
} catch (PrestoException e) {
    if (e.getCause() instanceof TableNotFoundException) {
        metadataManager.createAndRegisterTables(); // recreate missing tables, then retry once
    } else {
        throw e;
    }
}

Prevention

When it happens

Trigger: Calling flush (or close, or tests testMutationIndex / testMutationIndexWithVisibilities) when the underlying index/metrics Accumulo table was deleted between writer creation and flush, or was never created because indexing metadata was never initialized.

Common situations: Someone dropped the index/metrics table in the Accumulo shell while a load ran; a Presto schema registered without running the connector's index/metrics table creation; wrong zookeeper/instance config pointing at a cluster lacking the tables.

Related errors


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