{"record":{"id":"dd228e69283265b5","repo":"apache/hadoop","slug":"no-valid-local-directories-in-property","errorCode":null,"errorMessage":"No valid local directories in property: {}","messagePattern":"No valid local directories in property: (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java","lineNumber":2834,"sourceCode":"    throws IOException {\n    String[] dirs = getTrimmedStrings(dirsProp);\n    int hashCode = path.hashCode();\n    FileSystem fs = FileSystem.getLocal(this);\n    for (int i = 0; i < dirs.length; i++) {  // try each local dir\n      int index = (hashCode+i & Integer.MAX_VALUE) % dirs.length;\n      Path file = new Path(dirs[index], path);\n      Path dir = file.getParent();\n      if (fs.mkdirs(dir) || fs.exists(dir)) {\n        return file;\n      }\n    }\n    LOG.warn(\"Could not make \" + path + \n             \" in local directories from \" + dirsProp);\n    for(int i=0; i < dirs.length; i++) {\n      int index = (hashCode+i & Integer.MAX_VALUE) % dirs.length;\n      LOG.warn(dirsProp + \"[\" + index + \"]=\" + dirs[index]);\n    }\n    throw new IOException(\"No valid local directories in property: \"+dirsProp);\n  }\n\n  /**\n   * Get a local file name under a directory named in <i>dirsProp</i> with\n   * the given <i>path</i>.  If <i>dirsProp</i> contains multiple directories,\n   * then one is chosen based on <i>path</i>'s hash code.  If the selected\n   * directory does not exist, an attempt is made to create it.\n   *\n   * @param dirsProp directory in which to locate the file.\n   * @param path file-path.\n   * @return local file under the directory with the given path.\n   * @throws IOException raised on errors performing I/O.\n   */\n  public File getFile(String dirsProp, String path)\n    throws IOException {\n    String[] dirs = getTrimmedStrings(dirsProp);\n    int hashCode = path.hashCode();\n    for (int i = 0; i < dirs.length; i++) {  // try each local dir","sourceCodeStart":2816,"sourceCodeEnd":2852,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java#L2816-L2852","documentation":"Error \"No valid local directories in property: {}\" thrown in apache/hadoop.","triggerScenarios":"Raised at runtime when the documented precondition or configuration requirement for this operation is violated.","commonSituations":"Misconfigured or missing property, invalid user input, or calling the API before its prerequisites are met.","solutions":["Set the property to at least one existing, writable local directory."],"exampleFix":"Create the directories listed in the property.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}