{"record":{"id":"c3fad03487d861a3","repo":"apache/hadoop","slug":"no-space-available-in-any-of-the-local-directories","errorCode":null,"errorMessage":"No space available in any of the local directories${pathNames} on host${hostname}","messagePattern":"No space available in any of the local directories(.+?) on host(.+?)","errorType":"exception","errorClass":"DiskErrorException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalDirAllocator.java","lineNumber":493,"sourceCode":"        }\n      }\n\n      note(history, \"Directory count is %d; total available capacity is %,d\",\n          dirCount, totalAvailable);\n\n      if (size == SIZE_UNKNOWN) {\n        //do roulette selection: pick dir with probability\n        // proportional to available size\n        note(history, \"Size not specified, so picking directories at random.\");\n\n        if (totalAvailable == 0) {\n          // log error and history\n          String newErrorText = E_NO_SPACE_AVAILABLE + pathNames\n              + \" on host\" + getHostname();\n          LOG.error(newErrorText);\n          LOG.error(history.toString());\n          // then raise the exception\n          throw new DiskErrorException(newErrorText);\n        }\n\n        // Keep rolling the wheel till we get a valid path\n        Random r = new java.util.Random();\n        while (numDirsSearched < numDirs && returnPath == null) {\n          long randomPosition = (r.nextLong() >>> 1) % totalAvailable;\n          int dir = 0;\n          while (randomPosition > availableOnDisk[dir]) {\n            randomPosition -= availableOnDisk[dir];\n            dir++;\n          }\n          ctx.dirNumLastAccessed.set(dir);\n          final Path localDir = ctx.localDirs[dir];\n          returnPath = createPath(localDir, pathStr, checkWrite);\n          if (returnPath == null) {\n            totalAvailable -= availableOnDisk[dir];\n            availableOnDisk[dir] = 0; // skip this disk\n            numDirsSearched++;","sourceCodeStart":475,"sourceCodeEnd":511,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalDirAllocator.java#L475-L511","documentation":"Error \"No space available in any of the local directories${pathNames} on host${hostname}\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalDirAllocator.java:493 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Free disk space on the configured local directories.","Add more directories to the local-dir list or clean up old temp files.","Check per-directory capacity limits and disk health on host${hostname}."],"exampleFix":null,"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-22T20:17:22.307Z"}