{"record":{"id":"7116b7552c4ab7c6","repo":"prestodb/presto","slug":"accumulo-table-dne-7116b7","errorCode":"ACCUMULO_TABLE_DNE","errorMessage":"Accumulo table does not exist","messagePattern":"Accumulo table does not exist","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"presto-accumulo/src/main/java/com/facebook/presto/accumulo/index/Indexer.java","lineNumber":304,"sourceCode":"    {\n        try {\n            // Flush index writer\n            indexWriter.flush();\n\n            // Write out metrics mutations\n            BatchWriter metricsWriter = connector.createBatchWriter(table.getMetricsTableName(), writerConfig);\n            metricsWriter.addMutations(getMetricsMutations());\n            metricsWriter.close();\n\n            // Re-initialize the metrics\n            metrics.clear();\n            metrics.put(METRICS_TABLE_ROW_COUNT, new AtomicLong(0));\n        }\n        catch (MutationsRejectedException e) {\n            throw new PrestoException(UNEXPECTED_ACCUMULO_ERROR, \"Index mutation was rejected by server on flush\", e);\n        }\n        catch (TableNotFoundException e) {\n            throw new PrestoException(ACCUMULO_TABLE_DNE, \"Accumulo table does not exist\", e);\n        }\n    }\n\n    /**\n     * Flushes all remaining mutations via {@link Indexer#flush} and closes the index writer.\n     */\n    @Override\n    public void close()\n    {\n        try {\n            flush();\n            indexWriter.close();\n        }\n        catch (MutationsRejectedException e) {\n            throw new PrestoException(UNEXPECTED_ACCUMULO_ERROR, \"Mutation was rejected by server on close\", e);\n        }\n    }\n","sourceCodeStart":286,"sourceCodeEnd":322,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-accumulo/src/main/java/com/facebook/presto/accumulo/index/Indexer.java#L286-L322","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Recreate the missing index/metrics tables or re-run the connector's schema/table registration for this Presto table","Confirm you are connected to the intended Accumulo instance (zookeepers/instance name) where the tables exist","Find what dropped the table (admin job, migration) and prevent it; re-run indexing after recreation","Verify expected table names in the Accumulo shell with 'tables -l' for the connector's namespace"],"exampleFix":"// before\nindexer.close(); // ACCUMULO_TABLE_DNE if index table was dropped\n// after\nif (!conn.tableOperations().exists(indexTable)) {\n    metadataManager.createAndRegisterTables(); // recreate index + metrics tables\n}\nindexer.close();","handlingStrategy":"validation","validationCode":"// before indexing, confirm index and metrics tables exist in the right instance\nif (!conn.tableOperations().exists(indexTable) || !conn.tableOperations().exists(metricsTable)) {\n    throw new IllegalStateException(\"Accumulo index/metrics table missing; re-register schema or recreate tables\");\n}","typeGuard":"static boolean isTableMissing(PrestoException e) {\n    return e.getCause() instanceof TableNotFoundException;\n}","tryCatchPattern":"try {\n    indexer.close();\n} catch (PrestoException e) {\n    if (e.getCause() instanceof TableNotFoundException) {\n        metadataManager.createAndRegisterTables(); // recreate missing tables, then retry once\n    } else {\n        throw e;\n    }\n}","preventionTips":["Never drop Accumulo index/metrics tables while Presto loads are in flight","Re-run schema registration after connecting to a new or restored Accumulo instance","Pin zookeeper/instance config so all components target the same cluster","Add a startup existence check for the connector's index and metrics tables"],"tags":["accumulo","presto","table-not-found","metadata"],"backgroundTag":"accumulo-table-not-found","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}