{"record":{"id":"b0c0353059cc855b","repo":"prestodb/presto","slug":"generic-internal-error-b0c035","errorCode":"GENERIC_INTERNAL_ERROR","errorMessage":"cannot create caching file system","messagePattern":"cannot create caching file system","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-hive/src/main/java/com/facebook/presto/hive/cache/HiveCachingHdfsConfiguration.java","lineNumber":83,"sourceCode":"        @SuppressWarnings(\"resource\")\n        Configuration config = new CachingJobConf((factoryConfig, factoryUri) -> {\n            try {\n                Configuration currentConfig = defaultConfig;\n                if (uri.compareTo(factoryUri) != 0) {\n                    currentConfig = hiveHdfsConfiguration.getConfiguration(context, factoryUri);\n                }\n                FileSystem fileSystem = (new Path(factoryUri)).getFileSystem(currentConfig);\n                checkState(fileSystem instanceof ExtendedFileSystem);\n                return cacheFactory.createCachingFileSystem(\n                        factoryConfig,\n                        factoryUri,\n                        (ExtendedFileSystem) fileSystem,\n                        cacheManager,\n                        context.getSession().map(HiveSessionProperties::isCacheEnabled).orElse(cacheConfig.isCachingEnabled()),\n                        cacheConfig);\n            }\n            catch (IOException e) {\n                throw new PrestoException(GENERIC_INTERNAL_ERROR, \"cannot create caching file system\", e);\n            }\n        }, defaultConfig);\n        return config;\n    }\n\n    public static class CachingJobConf\n            extends WrapperJobConf\n            implements FileSystemFactory\n    {\n        private final BiFunction<Configuration, URI, FileSystem> factory;\n\n        public CachingJobConf(BiFunction<Configuration, URI, FileSystem> factory, Configuration config)\n        {\n            super(config);\n            this.factory = requireNonNull(factory, \"factory is null\");\n        }\n\n        @Override","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hive/src/main/java/com/facebook/presto/hive/cache/HiveCachingHdfsConfiguration.java#L65-L101","documentation":"getConfiguration's CachingJobConf factory wraps exceptions from building the caching FileSystem for a given URI (unsupported filesystem, cache factory failure); any failure creating the caching FS wrapper is reported with this message.","triggerScenarios":"Thrown at presto-hive/src/main/java/com/facebook/presto/hive/cache/HiveCachingHdfsConfiguration.java:83 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check cache factory configuration and cache type settings","Verify the underlying filesystem for the URI is reachable","Inspect the nested exception 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-11T21:17:09.523Z"}