{"record":{"id":"39678e3008656e49","repo":"prestodb/presto","slug":"hudi-filesystem-error","errorCode":"HUDI_FILESYSTEM_ERROR","errorMessage":"Could not open file system for ${split.getTable()}","messagePattern":"Could not open file system for (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"critical","filePath":"presto-hudi/src/main/java/com/facebook/presto/hudi/HudiRecordCursors.java","lineNumber":88,"sourceCode":"            ZoneId hiveStorageTimeZone,\n            TypeManager typeManager)\n    {\n        requireNonNull(session, \"session is null\");\n        checkArgument(dataColumns.stream().allMatch(HudiRecordCursors::isRegularColumn), \"dataColumns contains non regular column\");\n        HudiFile baseFile = getHudiBaseFile(split);\n        Path path = new Path(baseFile.getPath());\n\n        HdfsContext context = new HdfsContext(session,\n                split.getTable().getSchemaName(),\n                split.getTable().getTableName(),\n                baseFile.getPath(),\n                false);\n        Configuration conf = null;\n        try {\n            conf = hdfsEnvironment.getFileSystem(context, path).getConf();\n        }\n        catch (IOException e) {\n            throw new PrestoException(HUDI_FILESYSTEM_ERROR, \"Could not open file system for \" + split.getTable(), e);\n        }\n        final Configuration configuration = conf;\n        return hdfsEnvironment.doAs(session.getUser(), () -> {\n            RecordReader<?, ?> recordReader = createRecordReader(configuration, schema, split, dataColumns);\n            @SuppressWarnings(\"unchecked\") RecordReader<?, ? extends Writable> reader = (RecordReader<?, ? extends Writable>) recordReader;\n            return createRecordCursor(session, configuration, path, reader, baseFile.getLength(), schema, dataColumns, hiveStorageTimeZone, typeManager);\n        });\n    }\n\n    private static RecordReader<?, ?> createRecordReader(\n            Configuration configuration,\n            Properties schema,\n            HudiSplit split,\n            List<HudiColumnHandle> dataColumns)\n    {\n        // update configuration\n        JobConf jobConf = new JobConf(configuration);\n        jobConf.setBoolean(READ_ALL_COLUMNS, false);","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hudi/src/main/java/com/facebook/presto/hudi/HudiRecordCursors.java#L70-L106","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Verify HDFS availability and that the table path in the message is correct and accessible from Presto workers","Check Kerberos/authentication setup (tokens, keytabs, hdfsEnvironment config) and refresh expired credentials","Fix catalog HDFS configuration (core-site/fs settings) and network connectivity/firewall rules","Retry after the transient HDFS issue resolves"],"exampleFix":"// verify from a Presto worker host\n// before: NameNode hostname wrong in core-site.xml\nfs.defaultFS=hdfs://wrong-nn:9000\n// after\nfs.defaultFS=hdfs://nn-host:9000","handlingStrategy":"validation","validationCode":"// Verify filesystem reachability before submitting scans\nConfiguration conf = new Configuration();\nPath path = new Path(tableLocation);\ntry {\n    FileSystem fs = path.getFileSystem(conf);\n    fs.checkPath(path); // throws IOException if unreachable/invalid\n} catch (IOException e) {\n    throw new IllegalStateException(\"HDFS unavailable for \" + tableLocation, e);\n}","typeGuard":null,"tryCatchPattern":"try {\n    return query(morTable);\n} catch (PrestoException e) {\n    if (isHudiErrorCode(e, \"HUDI_FILESYSTEM_ERROR\") && e.getCause() instanceof IOException) {\n        // check HDFS health / Kerberos, then retry with backoff\n        return withRetry(3, backoff(), () -> query(morTable));\n    }\n    throw e;\n}","preventionTips":["Monitor HDFS NameNode health and worker->HDFS connectivity","Keep Kerberos tickets/keytabs fresh on Presto nodes (relogin/renewal configured)","Validate fs.defaultFS and catalog HDFS settings in every environment","Run a smoke scan against each Hudi catalog after deployments"],"tags":["presto","hudi","hdfs","filesystem","connectivity"],"backgroundTag":"filesystem-unavailable","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"}