{"record":{"id":"78be9fd8f195fe38","repo":"prestodb/presto","slug":"hive-filesystem-error-78be9f","errorCode":"HIVE_FILESYSTEM_ERROR","errorMessage":"Failed getting FileSystem: ${path}","messagePattern":"Failed getting FileSystem: (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-hive/src/main/java/com/facebook/presto/hive/s3select/S3SelectRecordCursorProvider.java","lineNumber":86,"sourceCode":"            ConnectorSession session,\n            HiveFileSplit fileSplit,\n            Properties schema,\n            List<HiveColumnHandle> columns,\n            TupleDomain<HiveColumnHandle> effectivePredicate,\n            DateTimeZone hiveStorageTimeZone,\n            TypeManager typeManager,\n            boolean s3SelectPushdownEnabled)\n    {\n        if (!s3SelectPushdownEnabled) {\n            return Optional.empty();\n        }\n\n        Path path = new Path(fileSplit.getPath());\n        try {\n            this.hdfsEnvironment.getFileSystem(session.getUser(), path, configuration);\n        }\n        catch (IOException e) {\n            throw new PrestoException(HIVE_FILESYSTEM_ERROR, \"Failed getting FileSystem: \" + path, e);\n        }\n\n        // Query is not going to filter any data, no need to use S3 Select.\n        if (!hasFilters(schema, effectivePredicate, columns)) {\n            return Optional.empty();\n        }\n\n        String serdeName = getDeserializerClassName(schema);\n        Optional<S3SelectDataType> s3SelectDataTypeOptional = S3SelectSerDeDataTypeMapper.getDataType(serdeName);\n\n        if (s3SelectDataTypeOptional.isPresent()) {\n            S3SelectDataType s3SelectDataType = s3SelectDataTypeOptional.get();\n\n            IonSqlQueryBuilder queryBuilder = new IonSqlQueryBuilder(typeManager, s3SelectDataType);\n            String ionSqlQuery = queryBuilder.buildSql(columns, effectivePredicate);\n            Optional<S3SelectLineRecordReader> recordReader = S3SelectLineRecordReaderProvider.get(configuration, clientConfig, path, fileSplit.getStart(), fileSplit.getLength(), fileSplit.getFileSize(), schema, ionSqlQuery, s3ClientFactory, s3SelectDataType);\n\n            // If S3 Select data type is not mapped to a S3SelectLineRecordReader it will return Optional.empty()","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hive/src/main/java/com/facebook/presto/hive/s3select/S3SelectRecordCursorProvider.java#L68-L104","documentation":"A validation guard in the S3 Select record-cursor provider: it proactively resolves a FileSystem for the split's path via hdfsEnvironment.getFileSystem and wraps any failure (bad scheme, missing authority, underlying Hadoop FileSystem creation error) in this exception before record-cursor creation can proceed.","triggerScenarios":"Thrown at presto-hive/src/main/java/com/facebook/presto/hive/s3select/S3SelectRecordCursorProvider.java:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the path scheme (e.g. s3a://, s3://) has a configured Hadoop FileSystem implementation in the cluster","Check that the S3/HDFS credentials and configuration for the user are correct","Confirm the table location URI in the metastore is well-formed and points to an accessible location"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}