{"record":{"id":"54f6ade1f96a486d","repo":"prestodb/presto","slug":"unexpected-accumulo-error-54f6ad","errorCode":"UNEXPECTED_ACCUMULO_ERROR","errorMessage":"Accumulo error when creating BatchWriter and/or Indexer","messagePattern":"Accumulo error when creating BatchWriter and/or Indexer","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"presto-accumulo/src/main/java/com/facebook/presto/accumulo/io/AccumuloPageSink.java","lineNumber":126,"sourceCode":"            // Create a BatchWriter to the Accumulo table\n            BatchWriterConfig conf = new BatchWriterConfig();\n            writer = connector.createBatchWriter(table.getFullTableName(), conf);\n\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","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-accumulo/src/main/java/com/facebook/presto/accumulo/io/AccumuloPageSink.java#L108-L144","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check the nested AccumuloException/AccumuloSecurityException message for the root cause","Validate Presto's Accumulo connector properties (zookeepers, instance name, username, password) and test connectivity with the Accumulo shell","Grant the configured user WRITE (and CREATE if indexing) permissions on the data and index tables: grant Table.WRITE -t table -u user","Confirm network/DNS from the Presto coordinator to ZooKeeper and tablet servers, then retry the write"],"exampleFix":"// before\n// user lacks write permission on index table\n// (sink creation fails with AccumuloSecurityException)\n// after\n// in Accumulo shell, as root:\ngrant Table.WRITE -t mydata_index -u presto_user;\ngrant Table.CREATE -u presto_user;","handlingStrategy":"try-catch","validationCode":"// Validate connectivity and permissions before creating a sink\nConnector conn = instance.getConnector(user, password);\nconn.tableOperations().exists(dataTable); // throws if instance unreachable\nconn.securityOperations().hasTablePermission(user, dataTable, TablePermission.WRITE);\nconn.securityOperations().hasTablePermission(user, indexTable, TablePermission.WRITE);","typeGuard":null,"tryCatchPattern":"try {\n    AccumuloPageSink sink = new AccumuloPageSink(...);\n} catch (PrestoException e) {\n    if (e.getErrorCode().getCode() == StandardErrorCode.UNEXPECTED_ACCUMULO_ERROR.toErrorCode().getCode()\n            && e.getCause() instanceof AccumuloSecurityException) {\n        throw new RuntimeException(\"Accumulo credentials/permissions invalid; fix connector auth config\", e);\n    }\n    throw e;\n}","preventionTips":["Validate ZooKeeper quorum, instance name, and credentials in Presto's Accumulo properties before deploying","Grant the connector user WRITE on both data and index tables","Smoke-test the connector with a small write after config changes","Monitor network/DNS from Presto nodes to ZooKeeper and tablet servers"],"tags":["accumulo","batch-writer","connection","authentication"],"backgroundTag":"accumulo-writer-setup-failed","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"}