prestodb/presto · error · UncheckedIOException
UncheckedIOException
Error message
UncheckedIOException
What it means
HudiPageSource.close() delegates to the underlying page source's close and translates a checked IOException into an UncheckedIOException. This is thrown when releasing the underlying reader fails, and it can surface from closeWithSuppression during error handling, potentially masking the original query error.
Solutions
- Check the chained IOException cause for the filesystem-level problem (HDFS connectivity, permissions)
- Verify HDFS cluster health and network stability from the Presto worker
- If it masks an earlier error, look at the suppressed exception for the root cause
- Retry the query; transient filesystem failures during close usually do not corrupt state
Defensive patterns
Strategy: try-catch
Try / catch
try (HudiPageSource source = openSource(split)) {
return source.getNextPage();
} catch (UncheckedIOException e) {
log.warn("Failed to close Hudi source; cause={}", e.getCause());
// check suppressed exceptions for the primary query error
} Prevention
- Treat close-time UncheckedIOException as secondary; inspect suppressed exceptions for the root error
- Ensure stable HDFS connectivity from workers
- Avoid force-cancelling long scans during HDFS instability
- Monitor worker logs for repeated close failures pointing at reader leaks
When it happens
Trigger: Calling close() (directly or via closeWithSuppression after a cursor error or query cancellation) when delegate.close() throws IOException — typically because the underlying HDFS/file reader fails while being released.
Common situations: HDFS client issues or NameNode unavailability at cleanup time, interrupted/close races on split readers, or underlying filesystem timeouts during teardown.
Related errors
- could not close some single stream spillers
- HUDI_CANNOT_OPEN_SPLIT
- HUDI_CANNOT_OPEN_SPLIT
- java.io.IOException (wrapped in UncheckedIOException)
- Failed to append record
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/afa8a719bf73cbc5.
Report an issue: GitHub.
Appendix: source
Thrown at presto-hudi/src/main/java/com/facebook/presto/hudi/HudiPageSource.java:166
}
}
return new Page(batchSize, blocks);
}
catch (RuntimeException e) {
closeWithSuppression(e);
throwIfInstanceOf(e, PrestoException.class);
throw new PrestoException(HUDI_CURSOR_ERROR, e);
}
}
@Override
public void close()
{
try {
delegate.close();
}
catch (IOException e) {
throw new UncheckedIOException(e);
}
}
@Override
public String toString()
{
return delegate.toString();
}
@Override
public long getSystemMemoryUsage()
{
return delegate.getSystemMemoryUsage();
}
protected void closeWithSuppression(Throwable throwable)
{
requireNonNull(throwable, "throwable is null");View on GitHub (pinned to 55bb57d202)