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.

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)

Solutions

  1. Check the chained IOException cause for the filesystem-level problem (HDFS connectivity, permissions)
  2. Verify HDFS cluster health and network stability from the Presto worker
  3. If it masks an earlier error, look at the suppressed exception for the root cause
  4. 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

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


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/afa8a719bf73cbc5. Report an issue: GitHub.