{"record":{"id":"b4425fbb485cad70","repo":"apache/seatunnel","slug":"failed-to-get-file-system-b4425f","errorCode":null,"errorMessage":"Failed to get file system","messagePattern":"Failed to get file system","errorType":"exception","errorClass":"IMapStorageException","httpStatus":null,"severity":"critical","filePath":"seatunnel-engine/seatunnel-engine-storage/imap-storage-plugins/imap-storage-file/src/main/java/org/apache/seatunnel/engine/imap/storage/file/IMapFileStorage.java","lineNumber":159,"sourceCode":"        this.writDataTimeoutMilliseconds =\n                (long)\n                        configuration.getOrDefault(\n                                WRITE_DATA_TIMEOUT_MILLISECONDS_KEY,\n                                DEFAULT_WRITE_DATA_TIMEOUT_MILLISECONDS);\n\n        this.region = String.valueOf(System.nanoTime());\n        this.businessRootPath =\n                namespace\n                        + DEFAULT_IMAP_FILE_PATH_SPLIT\n                        + clusterName\n                        + DEFAULT_IMAP_FILE_PATH_SPLIT\n                        + businessName\n                        + DEFAULT_IMAP_FILE_PATH_SPLIT;\n        try {\n            this.fs = FileSystem.get(hadoopConf);\n            fs.setWriteChecksum(false);\n        } catch (IOException e) {\n            throw new IMapStorageException(\"Failed to get file system\", e);\n        }\n        this.serializer = new ProtoStuffSerializer();\n        this.walDisruptor =\n                new WALDisruptor(\n                        fs,\n                        FileConfiguration.valueOf(storageType.toUpperCase()),\n                        businessRootPath + region + DEFAULT_IMAP_FILE_PATH_SPLIT,\n                        serializer);\n    }\n\n    @Override\n    public boolean store(Object key, Object value) {\n        IMapFileData data;\n        try {\n            data = parseToIMapFileData(key, value);\n        } catch (IOException e) {\n            log.error(\"parse to IMapFileData error, key is {}, value is {}\", key, value, e);\n            return false;","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-storage/imap-storage-plugins/imap-storage-file/src/main/java/org/apache/seatunnel/engine/imap/storage/file/IMapFileStorage.java#L141-L177","documentation":"IMapFileStorage.initialize() wraps any IOException from Hadoop's FileSystem.get(hadoopConf) into an IMapStorageException with this message. It means the storage layer could not obtain a handle to the configured HDFS (or local) file system, so the IMap write-ahead-log storage cannot start. The engine's create() path fails immediately.","triggerScenarios":"Calling IMapStorageFactory.create()/initialize() with a storage path whose HDFS NameNode is unreachable, an invalid fs.defaultFS URI, missing Hadoop configuration files (core-site.xml/hdfs-site.xml on classpath), or a local filesystem misconfiguration (e.g. file:// URI with bad path).","commonSituations":"Zeta engine start-up with imap file storage in a cluster where HDFS is down or HA nameservice misconfigured; missing HADOOP_CONF_DIR; user lacks Kerberos ticket before FileSystem.get; wrong hadoop dependency version shading conflicts.","solutions":["Verify the HDFS cluster / NameNode is running and reachable (hdfs dfsadmin -report).","Check fs.defaultFS / core-site.xml and hdfs-site.xml are on the classpath and HADOOP_CONF_DIR is set.","Confirm the storage root path URI in the engine config is correct and accessible by the running user.","If Kerberos is used, ensure login/authentication runs before FileSystem.get and the keytab/principal are valid.","Inspect the wrapped cause (e.getCause()) in the log for the underlying IOException detail."],"exampleFix":"// before\nthis.fs = FileSystem.get(hadoopConf);\n// after\ntry {\n    this.fs = FileSystem.get(hadoopConf);\n} catch (IOException e) {\n    throw new IMapStorageException(\"Failed to get file system for path \" + businessRootPath, e);\n} // also validate connectivity before init: FileSystem.get(...).getStatus()","handlingStrategy":"validation","validationCode":"org.apache.hadoop.fs.FileSystem local = null;\ntry {\n    local = org.apache.hadoop.fs.FileSystem.get(hadoopConf);\n    local.getStatus(); // forces connectivity check\n} catch (IOException e) {\n    throw new IllegalStateException(\"HDFS unreachable: \" + e.getMessage(), e);\n}","typeGuard":"boolean fsReachable(org.apache.hadoop.conf.Configuration conf) {\n    try { org.apache.hadoop.fs.FileSystem.get(conf).getStatus(); return true; }\n    catch (IOException e) { return false; }\n}","tryCatchPattern":"try { storage.initialize(props); } catch (IMapStorageException e) { log.error(\"storage init failed\", e.getCause()); /* abort start-up or fall back to local FS */ }","preventionTips":["Keep core-site.xml/hdfs-site.xml on the classpath and HADOOP_CONF_DIR set","Run hdfs dfsadmin -report as part of pre-start health checks","Validate the fs.defaultFS URI in configs before deploy","Set up Kerberos login before any FileSystem.get call"],"tags":["hadoop","hdfs","storage","initialization","io"],"backgroundTag":"network-request-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}