{"record":{"id":"6fcbf18aaf4f2ff5","repo":"prestodb/presto","slug":"accumulo-table-dne-6fcbf1","errorCode":"ACCUMULO_TABLE_DNE","errorMessage":"Accumulo error when creating BatchWriter and/or Indexer, table does not exist","messagePattern":"Accumulo error when creating BatchWriter and/or Indexer, table does not exist","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"presto-accumulo/src/main/java/com/facebook/presto/accumulo/io/AccumuloPageSink.java","lineNumber":129,"sourceCode":"\n            // If the table is indexed, create an instance of an Indexer, else empty\n            if (table.isIndexed()) {\n                indexer = Optional.of(\n                        new Indexer(\n                                connector,\n                                connector.securityOperations().getUserAuthorizations(username),\n                                table,\n                                conf));\n            }\n            else {\n                indexer = Optional.empty();\n            }\n        }\n        catch (AccumuloException | AccumuloSecurityException e) {\n            throw new PrestoException(UNEXPECTED_ACCUMULO_ERROR, \"Accumulo error when creating BatchWriter and/or Indexer\", e);\n        }\n        catch (TableNotFoundException e) {\n            throw new PrestoException(ACCUMULO_TABLE_DNE, \"Accumulo error when creating BatchWriter and/or Indexer, table does not exist\", e);\n        }\n    }\n\n    /**\n     * Converts a {@link Row} to an Accumulo mutation.\n     *\n     * @param row Row object\n     * @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.\n     * @param columns All column handles for the Row, sorted by ordinal.\n     * @param serializer Instance of {@link AccumuloRowSerializer} used to encode the values of the row to the Mutation\n     * @return Mutation\n     */\n    public static Mutation toMutation(Row row, int rowIdOrdinal, List<AccumuloColumnHandle> columns, AccumuloRowSerializer serializer)\n    {\n        // Set our value to the row ID\n        Text value = new Text();\n        Field rowField = row.getField(rowIdOrdinal);\n        if (rowField.isNull()) {","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-accumulo/src/main/java/com/facebook/presto/accumulo/io/AccumuloPageSink.java#L111-L147","documentation":"Thrown when creating the AccumuloPageSink's BatchWriter or Indexer fails because the target Accumulo table (or its index table) does not exist, detected via TableNotFoundException. ACCUMULO_TABLE_DNE tells the user that the Presto-facing table is registered but the backing Accumulo table is missing, distinct from the generic UNEXPECTED_ACCUMULO_ERROR for other setup failures.","triggerScenarios":"Constructing AccumuloPageSink for a Presto table whose underlying Accumulo table was dropped externally (accumulo shell drop table), renamed, or never created (metadata registered without create_table=true); the index table missing when indexing is enabled.","commonSituations":"Someone deleted the Accumulo table directly to 'clean up' while Presto still has schema metadata; a Presto/Accumulo restore from backup where the schema table entries survived but the data tables didn't; typo'd or changed table name mapping after a version migration.","solutions":["Recreate the missing Accumulo table matching the name in Presto metadata (via the Accumulo shell or the Presto Accumulo connector's create table path)","Drop and re-create the table through Presto so metadata and the Accumulo table are created together","Confirm the configured index table name also exists if indexing is enabled (check user_tables_mapping and the connector config)","Audit ops procedures so Accumulo tables are only dropped via the Presto connector (DROP TABLE) to keep metadata in sync"],"exampleFix":"// before\n// Accumulo table dropped out-of-band; Presto still has schema\n// ERROR: ACCUMULO_TABLE_DNE on sink creation\n// after\n-- in Presto, recreate metadata and backing table together\nCREATE TABLEmyschema.mytable (... ) WITH (external=false);\n-- or re-register with the Accumulo connector's table-setup tool","handlingStrategy":"validation","validationCode":"Connector conn = instance.getConnector(user, password);\nif (!conn.tableOperations().exists(dataTable)) {\n    throw new IllegalStateException(\"Accumulo table missing: \" + dataTable);\n}\nif (!conn.tableOperations().exists(indexTable)) {\n    throw new IllegalStateException(\"Accumulo index table missing: \" + indexTable);\n}","typeGuard":null,"tryCatchPattern":"try {\n    AccumuloPageSink sink = new AccumuloPageSink(...);\n} catch (PrestoException e) {\n    if (e.getErrorCode().getCode() == StandardErrorCode.ACCUMULO_TABLE_DNE.toErrorCode().getCode()) {\n        // recover by recreating the backing table or re-registering via Presto\n        throw new RuntimeException(\"Backing Accumulo table missing; run CREATE TABLE via Presto to recreate\", e);\n    }\n    throw e;\n}","preventionTips":["Only drop tables through Presto's DROP TABLE so metadata and Accumulo tables stay in sync","Run a periodic reconciliation check that every registered Presto table has a backing Accumulo table","Restore schema metadata and data tables together from backups","Enable indexing only when the corresponding index table is created by the connector"],"tags":["accumulo","missing-table","batch-writer","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"}