{"record":{"id":"3dcb3774e7076043","repo":"apache/seatunnel","slug":"load-all-keys-error-parent-path-is-businessrootp","errorCode":null,"errorMessage":"load all keys error parent path is ${businessRootPath}","messagePattern":"load all keys error parent path is (.+?)","errorType":"exception","errorClass":"IMapStorageException","httpStatus":null,"severity":"error","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":250,"sourceCode":"    }\n\n    @Override\n    public Map<Object, Object> loadAll() {\n        try {\n            WALReader reader = new WALReader(fs, fileConfiguration, serializer);\n            return reader.loadAllData(new Path(businessRootPath), new HashSet<>());\n        } catch (IOException e) {\n            throw new IMapStorageException(\"load all data error\", e);\n        }\n    }\n\n    @Override\n    public Set<Object> loadAllKeys() {\n        try {\n            WALReader reader = new WALReader(fs, fileConfiguration, serializer);\n            return reader.loadAllKeys(new Path(businessRootPath));\n        } catch (IOException e) {\n            throw new IMapStorageException(\n                    e, \"load all keys error parent path is {}\", e, businessRootPath);\n        }\n    }\n\n    @Override\n    public void destroy(boolean deleteAllFileFlag) {\n        log.info(\n                \"start destroy IMapFileStorage, businessName is {}, cluster name is {}\",\n                businessName,\n                region);\n        /**\n         * 1. close current disruptor 2. delete all files notice: we can not delete the files in the\n         * middle of the write, so some current file may be not deleted\n         */\n        try {\n            walDisruptor.close();\n        } catch (IOException e) {\n            log.error(\"close walDisruptor error\", e);","sourceCodeStart":232,"sourceCodeEnd":268,"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#L232-L268","documentation":"loadAllKeys() enumerates WAL keys under businessRootPath via WALReader.loadAllKeys; an IOException there is wrapped in this IMapStorageException. It indicates the key index tree under the business root path could not be listed/read.","triggerScenarios":"Calling IMapFileStorage.loadAllKeys() when businessRootPath is missing, HDFS listing fails (NameNode unreachable, permission denied), or WAL key files are unreadable/corrupt.","commonSituations":"Storage directory wiped between engine restarts; HDFS permissions changed after Kerberos user switch; flaky network to HDFS during cluster recovery.","solutions":["Verify businessRootPath exists and list it manually (hdfs dfs -ls <businessRootPath>).","Check HDFS connectivity and NameNode health.","Confirm read permissions for the engine's user on the path.","Recover or re-create the storage directory if it was deleted (see destroy/init flow).","Retry on transient IOExceptions."],"exampleFix":"// before\nthrow new IMapStorageException(e, \"load all keys error parent path is {}\", e, businessRootPath);\n// after (ensure path exists first)\nif (!fs.exists(new Path(businessRootPath))) {\n    return new HashSet<>();\n}\nreturn reader.loadAllKeys(new Path(businessRootPath));","handlingStrategy":"validation","validationCode":"if (!fs.exists(new org.apache.hadoop.fs.Path(businessRootPath))) {\n    throw new IllegalStateException(\"WAL root path missing: \" + businessRootPath);\n}","typeGuard":null,"tryCatchPattern":"try { Set<Object> keys = storage.loadAllKeys(); } catch (IMapStorageException e) { /* inspect cause IOException: exists? permissions? retry */ }","preventionTips":["Confirm the path exists before engine recovery","Avoid wiping storage directories between restarts","Grant the engine user recursive read on the storage tree","Retry transient HDFS IOExceptions with backoff"],"tags":["hdfs","io","storage","keys"],"backgroundTag":"file-read-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"}