prestodb/presto · critical · PrestoException

HUDI_FILESYSTEM_ERROR

HUDI_FILESYSTEM_ERROR

Error message

Could not open file system for ${split.getTable()}

What it means

createRealtimeRecordCursor needs a Hadoop FileSystem for the split's path to build the record reader; if obtaining it throws IOException, the connector throws HUDI_FILESYSTEM_ERROR with the table name. This indicates the worker could not reach or initialize the filesystem backing the table.

Source

Thrown at presto-hudi/src/main/java/com/facebook/presto/hudi/HudiRecordCursors.java:88

            ZoneId hiveStorageTimeZone,
            TypeManager typeManager)
    {
        requireNonNull(session, "session is null");
        checkArgument(dataColumns.stream().allMatch(HudiRecordCursors::isRegularColumn), "dataColumns contains non regular column");
        HudiFile baseFile = getHudiBaseFile(split);
        Path path = new Path(baseFile.getPath());

        HdfsContext context = new HdfsContext(session,
                split.getTable().getSchemaName(),
                split.getTable().getTableName(),
                baseFile.getPath(),
                false);
        Configuration conf = null;
        try {
            conf = hdfsEnvironment.getFileSystem(context, path).getConf();
        }
        catch (IOException e) {
            throw new PrestoException(HUDI_FILESYSTEM_ERROR, "Could not open file system for " + split.getTable(), e);
        }
        final Configuration configuration = conf;
        return hdfsEnvironment.doAs(session.getUser(), () -> {
            RecordReader<?, ?> recordReader = createRecordReader(configuration, schema, split, dataColumns);
            @SuppressWarnings("unchecked") RecordReader<?, ? extends Writable> reader = (RecordReader<?, ? extends Writable>) recordReader;
            return createRecordCursor(session, configuration, path, reader, baseFile.getLength(), schema, dataColumns, hiveStorageTimeZone, typeManager);
        });
    }

    private static RecordReader<?, ?> createRecordReader(
            Configuration configuration,
            Properties schema,
            HudiSplit split,
            List<HudiColumnHandle> dataColumns)
    {
        // update configuration
        JobConf jobConf = new JobConf(configuration);
        jobConf.setBoolean(READ_ALL_COLUMNS, false);

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Verify HDFS availability and that the table path in the message is correct and accessible from Presto workers
  2. Check Kerberos/authentication setup (tokens, keytabs, hdfsEnvironment config) and refresh expired credentials
  3. Fix catalog HDFS configuration (core-site/fs settings) and network connectivity/firewall rules
  4. Retry after the transient HDFS issue resolves

Example fix

// verify from a Presto worker host
// before: NameNode hostname wrong in core-site.xml
fs.defaultFS=hdfs://wrong-nn:9000
// after
fs.defaultFS=hdfs://nn-host:9000
Defensive patterns

Strategy: validation

Validate before calling

// Verify filesystem reachability before submitting scans
Configuration conf = new Configuration();
Path path = new Path(tableLocation);
try {
    FileSystem fs = path.getFileSystem(conf);
    fs.checkPath(path); // throws IOException if unreachable/invalid
} catch (IOException e) {
    throw new IllegalStateException("HDFS unavailable for " + tableLocation, e);
}

Try / catch

try {
    return query(morTable);
} catch (PrestoException e) {
    if (isHudiErrorCode(e, "HUDI_FILESYSTEM_ERROR") && e.getCause() instanceof IOException) {
        // check HDFS health / Kerberos, then retry with backoff
        return withRetry(3, backoff(), () -> query(morTable));
    }
    throw e;
}

Prevention

When it happens

Trigger: hdfsEnvironment.getFileSystem(context, path) fails with IOException while creating a realtime (MOR/record) cursor — HDFS NameNode unreachable, path invalid, Kerberos/token problems, or filesystem plugin misconfiguration.

Common situations: HDFS outage or misconfigured fs.defaultFS, expired Kerberos tokens / missing keytab, wrong hudi/Hive catalog HDFS settings, network/partition issues between Presto workers and HDFS.

Related errors


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