{"record":{"id":"32132ab54a44d8af","repo":"prestodb/presto","slug":"unexpected-accumulo-error","errorCode":"UNEXPECTED_ACCUMULO_ERROR","errorMessage":"Failed to get splits from Accumulo","messagePattern":"Failed to get splits from Accumulo","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-accumulo/src/main/java/com/facebook/presto/accumulo/AccumuloClient.java","lineNumber":711,"sourceCode":"            LOG.debug(\"Fetching tablet locations: %s\", fetchTabletLocations);\n\n            for (Range range : splitRanges) {\n                // If locality is enabled, then fetch tablet location\n                if (fetchTabletLocations) {\n                    tabletSplits.add(new TabletSplitMetadata(getTabletLocation(tableName, range.getStartKey()), ImmutableList.of(range)));\n                }\n                else {\n                    // else, just use the default location\n                    tabletSplits.add(new TabletSplitMetadata(Optional.empty(), ImmutableList.of(range)));\n                }\n            }\n\n            // Log some fun stuff and return the tablet splits\n            LOG.debug(\"Number of splits for table %s is %d with %d ranges\", tableName, tabletSplits.size(), splitRanges.size());\n            return tabletSplits;\n        }\n        catch (Exception e) {\n            throw new PrestoException(UNEXPECTED_ACCUMULO_ERROR, \"Failed to get splits from Accumulo\", e);\n        }\n    }\n\n    /**\n     * Gets the scan authorizations to use for scanning tables.\n     * <p>\n     * In order of priority: session username authorizations, then table property, then the default connector auths.\n     *\n     * @param session Current session\n     * @param schema Schema name\n     * @param table Table Name\n     * @return Scan authorizations\n     * @throws AccumuloException If a generic Accumulo error occurs\n     * @throws AccumuloSecurityException If a security exception occurs\n     */\n    private Authorizations getScanAuthorizations(ConnectorSession session, String schema,\n            String table)\n            throws AccumuloException, AccumuloSecurityException","sourceCodeStart":693,"sourceCodeEnd":729,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-accumulo/src/main/java/com/facebook/presto/accumulo/AccumuloClient.java#L693-L729","documentation":"A catch-all wrapper around getTabletSplits: any exception raised while computing tablet split ranges for a table (Accumulo client I/O, metadata lookup, range building) is rethrown as UNEXPECTED_ACCUMULO_ERROR with this message and the original cause attached. It signals an unexpected failure talking to or reading metadata from Accumulo during split planning.","triggerScenarios":"Any Exception escaping the body of getTabletSplits while querying tablet metadata or building split ranges — e.g., Accumulo connection failures, table missing, authorization or I/O errors during range computation.","commonSituations":"Accumulo instance unreachable or restarted mid-query; invalid/missing ZooKeeper or instance configuration; table dropped or renamed between planning and split computation; permission/authorization errors on the metadata table.","solutions":["Inspect the wrapped cause in the exception stack trace to find the root error","Verify Accumulo connectivity (zookeepers, instance name, username/password) in Accumulo connector config","Confirm the table still exists and the user has read permissions on its metadata","Check Accumulo server health/logs (tablet servers, Master) and retry after the cluster recovers"],"exampleFix":"// before\nconnector.name=accumulo\n# zookeepers property missing -> client cannot reach the instance\n// after\nconnector.name=accumulo\naccumulo.zookeepers=zoo1:2181,zoo2:2181\naccumulo.instance=accumulo-instance\naccumulo.username=presto\naccumulo.password=****","handlingStrategy":"try-catch","validationCode":"// Java: verify connectivity before split-planning calls\nif (!client.isConnected() || !tableManager.exists(tableName)) {\n    throw new IllegalStateException(\"Accumulo unavailable or table \" + tableName + \" missing\");\n}","typeGuard":"// Java: ensure the split result is usable before relying on it\nboolean validSplits(List<ConnectorSplit> splits) {\n    return splits != null && !splits.isEmpty();\n}","tryCatchPattern":"try {\n    splits = client.getTabletSplits(tableName, splitRanges);\n} catch (PrestoException e) {\n    if (e.getErrorCode().getName().equals(\"UNEXPECTED_ACCUMULO_ERROR\")) {\n        LOG.error(\"Split planning failed\", e.getCause()); // inspect root cause\n        // fix connectivity/permissions, then retry\n    } else {\n        throw e;\n    }\n}","preventionTips":["Validate Accumulo connection settings (zookeepers, instance, credentials) before queries","Monitor Accumulo cluster health and tablet server availability","Ensure the querying user has read access to table and metadata tables","Always log and inspect the cause chained to this wrapper to find the real root cause","Add retry with backoff for transient Accumulo I/O errors during planning"],"tags":["accumulo","split-planning","io","unexpected-error"],"backgroundTag":"unexpected-accumulo-error","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"}