prestodb/presto · error · PrestoException
HIVE_UNKNOWN_ERROR
HIVE_UNKNOWN_ERROR
Error message
HIVE_UNKNOWN_ERROR (message from cause throwable)
What it means
The catch-all branch of propagatePrestoException: any throwable from background split loading that is neither a PrestoException nor a FileNotFoundException is wrapped in HIVE_UNKNOWN_ERROR with the cause as the message source. It indicates an unexpected failure during split production for which no specific error code applies.
Source
Thrown at presto-hive/src/main/java/com/facebook/presto/hive/HiveSplitSource.java:833
T current = atomicReference.get();
if (!predicate.test(current)) {
return false;
}
if (atomicReference.compareAndSet(current, newValue)) {
return true;
}
}
}
private static RuntimeException propagatePrestoException(Throwable throwable)
{
if (throwable instanceof PrestoException) {
throw (PrestoException) throwable;
}
if (throwable instanceof FileNotFoundException) {
throw new PrestoException(HIVE_FILE_NOT_FOUND, throwable);
}
throw new PrestoException(HIVE_UNKNOWN_ERROR, throwable);
}
interface PerBucket
{
ListenableFuture<?> offer(OptionalInt bucketNumber, InternalHiveSplit split);
ListenableFuture<List<ConnectorSplit>> borrowBatchAsync(OptionalInt bucketNumber, int maxSize, Function<List<InternalHiveSplit>, BorrowResult<InternalHiveSplit, List<ConnectorSplit>>> function);
default ListenableFuture<List<ConnectorSplit>> borrowBatchAsync(OptionalInt bucketNumber, Map<String, String> partitionValues, int maxSize, Function<List<InternalHiveSplit>, BorrowResult<InternalHiveSplit, List<ConnectorSplit>>> function)
{
throw new UnsupportedOperationException("partition-aware borrowBatchAsync requires a PerBucket implementation that supports partition values");
}
void noMoreSplits();
boolean isFinished(OptionalInt bucketNumber);
default boolean isFinished(OptionalInt bucketNumber, Map<String, String> partitionValues)View on GitHub (pinned to 55bb57d202)
Solutions
- Inspect the underlying cause (getCause()) in coordinator logs to find the real failure.
- Fix the root cause: metastore connectivity, credentials/tokens, storage timeouts, or network issues.
- Retry the query if the failure was transient (network blip).
- If reproducible, capture the cause stack trace and report as a bug with the full exception chain.
Defensive patterns
Strategy: retry
Type guard
boolean isUnknownHiveError(PrestoException e) {
return HIVE_UNKNOWN_ERROR.toErrorCode().getCode() == e.getErrorCode().getCode();
} Try / catch
try { runQuery(sql); } catch (PrestoException e) {
if (isUnknownHiveError(e)) {
logRootCause(e.getCause());
if (isTransient(e.getCause())) retryWithBackoff(sql); else throw e;
} else { throw e; }
} Prevention
- Check coordinator logs for the wrapped cause — HIVE_UNKNOWN_ERROR is only a wrapper
- Keep metastore and storage clients healthy (connection pools, token refresh)
- Retry only transient causes (timeouts, connection resets), fail fast on logic errors
- Report reproducible non-transient failures with the full cause chain
When it happens
Trigger: Async split enumeration tasks fail with arbitrary exceptions (IOException on the metastore/HDFS client, deserialization errors, network resets, NPEs inside the split source) which are rethrown through propagatePrestoException.
Common situations: Metastore connectivity drops mid-query; HDFS/S3 client timeouts; corrupt file metadata; bugs in storage handler code paths; cluster authentication token expiry.
Related errors
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/e41ebe10ceaca2c9.
Report an issue: GitHub.