{"record":{"id":"58984c539f7e6f8d","repo":"prestodb/presto","slug":"hive-filesystem-error-58984c","errorCode":"HIVE_FILESYSTEM_ERROR","errorMessage":"Failed getting FileSystem: ","messagePattern":"Failed getting FileSystem: ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-hive/src/main/java/com/facebook/presto/hive/HiveWriterFactory.java","lineNumber":307,"sourceCode":"                    sortFields,\n                    sortOrders,\n                    sortBufferSize,\n                    maxOpenSortFiles,\n                    pageSorter,\n                    orcFileWriterFactory,\n                    isSortedWriteToTempPathEnabled(session),\n                    getSortedWriteTempPathSubdirectoryCount(session)));\n        }\n        else {\n            this.sortingFileWriterFactory = Optional.empty();\n        }\n\n        // make sure the FileSystem is created with the correct Configuration object\n        try {\n            hdfsEnvironment.getFileSystem(session.getUser(), writePath, conf);\n        }\n        catch (IOException e) {\n            throw new PrestoException(HIVE_FILESYSTEM_ERROR, \"Failed getting FileSystem: \" + writePath, e);\n        }\n\n        this.hiveWriterStats = requireNonNull(hiveWriterStats, \"hiveWriterStats is null\");\n\n        // In Hive connector, bucket commit is fulfilled by writing to temporary file in TableWriterOperator, and rename in TableFinishOperator\n        // (note Presto partition here loosely maps to Hive bucket)\n        this.writeToTempFile = commitRequired;\n\n        this.encryptionInformation = requireNonNull(encryptionInformation, \"encryptionInformation is null\");\n    }\n\n    public HiveWriter createWriter(Page partitionColumns, int position, OptionalInt bucketNumber)\n    {\n        if (bucketCount.isPresent()) {\n            checkArgument(bucketNumber.isPresent(), \"Bucket not provided for bucketed table\");\n            checkArgument(bucketNumber.getAsInt() < bucketCount.getAsInt(), \"Bucket number %s must be less than bucket count %s\", bucketNumber, bucketCount);\n        }\n        else {","sourceCodeStart":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hive/src/main/java/com/facebook/presto/hive/HiveWriterFactory.java#L289-L325","documentation":"HiveWriterFactory constructor eagerly obtains the FileSystem with the correct Configuration; any IOException there (bad HDFS URI, NameNode unreachable, Kerberos failure) is wrapped in this PrestoException — writer setup failed.","triggerScenarios":"Thrown at presto-hive/src/main/java/com/facebook/presto/hive/HiveWriterFactory.java:307 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check HDFS/configuration correctness for the write path","Verify Kerberos credentials and permissions for the target user","Inspect the nested IOException cause"],"exampleFix":null,"handlingStrategy":"try-catch","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-12T02:17:10.037Z"}