{"record":{"id":"bb490fd8504e4efa","repo":"apache/seatunnel","slug":"error-adding-hadoop-resource-resource-was-not","errorCode":null,"errorMessage":"Error adding Hadoop resource {}, resource was not added","messagePattern":"Error adding Hadoop resource (.+?), resource was not added","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/storage/AbstractStorage.java","lineNumber":82,"sourceCode":"     *\n     * @return\n     */\n    protected Configuration loadHiveBaseHadoopConfig(ReadonlyConfig readonlyConfig) {\n        try {\n            Configuration configuration = new Configuration();\n            // Try to load from hadoop_conf_path(The Bucket configuration is typically in\n            // core-site.xml)\n            Optional<String> hadoopConfPath =\n                    readonlyConfig.getOptional(HiveBaseOptions.HADOOP_CONF_PATH);\n            if (hadoopConfPath.isPresent()) {\n                HADOOP_CONF_FILES.forEach(\n                        confFile -> {\n                            java.nio.file.Path path = Paths.get(hadoopConfPath.get(), confFile);\n                            if (Files.exists(path)) {\n                                try {\n                                    configuration.addResource(path.toUri().toURL());\n                                } catch (IOException e) {\n                                    log.warn(\n                                            \"Error adding Hadoop resource {}, resource was not added\",\n                                            path,\n                                            e);\n                                }\n                            }\n                        });\n            }\n            String hiveSitePath = readonlyConfig.get(HiveBaseOptions.HIVE_SITE_PATH);\n            String hdfsSitePath = readonlyConfig.get(HiveBaseOptions.HDFS_SITE_PATH);\n            if (StringUtils.isNotBlank(hdfsSitePath)) {\n                configuration.addResource(new File(hdfsSitePath).toURI().toURL());\n            }\n\n            if (StringUtils.isNotBlank(hiveSitePath)) {\n                configuration.addResource(new File(hiveSitePath).toURI().toURL());\n            }\n            // Try to load from hadoopConf\n            Optional<Map<String, String>> hadoopConf =","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/storage/AbstractStorage.java#L64-L100","documentation":"AbstractStorage.loadHiveBaseHadoopConfig adds each XML file found in the configured hadoop conf directory to the Hadoop Configuration via addResource(URL). If a file exists but its URL cannot be converted/loaded (IOException), the file is skipped with this warning, so missing properties from that file may cause later failures.","triggerScenarios":"loadHiveBaseHadoopConfig() iterates hadoop conf files; Paths.get(hadoopConfPath, confFile) exists but path.toUri().toURL() throws IOException — e.g. malformed path characters, unreadable/symlinked file, or IO error constructing the URL.","commonSituations":"hadoop_conf_dir pointing to a mounted/flaky filesystem, unusual characters in the conf path, files replaced mid-read during deployment.","solutions":["Check the hadoop_conf_dir path for special characters or broken symlinks and fix them","Ensure the conf files (core-site.xml, hdfs-site.xml, hive-site.xml) are readable by the job user","Re-deploy/refresh the hadoop conf directory if files were replaced concurrently","Add the required properties explicitly in the connector config if a file cannot be loaded"],"exampleFix":"// before\n\"hadoop_conf_path\" = \"/etc/hadoop conf/\" // space/special chars\n// after\n\"hadoop_conf_path\" = \"/etc/hadoop/conf\"","handlingStrategy":"validation","validationCode":"java.nio.file.Path p = Paths.get(hadoopConfPath, \"core-site.xml\");\nif (!java.nio.file.Files.isRegularFile(p) || !p.toUri().isAbsolute() && p.toString().contains(\" \"))\n  throw new IllegalArgumentException(\"Bad hadoop conf path: \" + p);","typeGuard":null,"tryCatchPattern":"try {\n  configuration.addResource(path.toUri().toURL());\n} catch (IOException e) {\n  log.warn(\"Skipping unreadable hadoop conf {}\", path, e);\n}","preventionTips":["Use absolute conf paths without spaces or special characters","Check file readability with the job's user before launch","Keep conf files stable during job runs (no in-place replacement)","Explicitly set critical properties if conf-dir loading is unreliable"],"tags":["hadoop","configuration","io"],"backgroundTag":"file-not-found","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"}