{"record":{"id":"163f30ef41752244","repo":"apache/hadoop","slug":"file-directory-does-not-exist","errorCode":null,"errorMessage":"File/Directory does not exist: {}","messagePattern":"File/Directory does not exist: (.+?)","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirStatAndListingOp.java","lineNumber":581,"sourceCode":"    } finally {\n      fsd.readUnlock();\n    }\n    QuotaUsage usage = getQuotaUsageInt(fsd, iip);\n    if (usage != null) {\n      return usage;\n    } else {\n      //If quota isn't set, fall back to getContentSummary.\n      return getContentSummaryInt(fsd, pc, iip);\n    }\n  }\n\n  private static QuotaUsage getQuotaUsageInt(FSDirectory fsd, INodesInPath iip)\n    throws IOException {\n    fsd.readLock();\n    try {\n      INode targetNode = iip.getLastINode();\n      if (targetNode == null) {\n        throw new FileNotFoundException(\n            \"File/Directory does not exist: \" + iip.getPath());\n      }\n      QuotaUsage usage = null;\n      if (targetNode.isDirectory()) {\n        DirectoryWithQuotaFeature feature =\n            targetNode.asDirectory().getDirectoryWithQuotaFeature();\n        if (feature != null) {\n          QuotaCounts counts = feature.getSpaceConsumed();\n          QuotaCounts quotas = feature.getQuota();\n          usage = new QuotaUsage.Builder().\n              fileAndDirectoryCount(counts.getNameSpace()).\n              quota(quotas.getNameSpace()).\n              spaceConsumed(counts.getStorageSpace()).\n              spaceQuota(quotas.getStorageSpace()).\n              typeConsumed(counts.getTypeSpaces().asArray()).\n              typeQuota(quotas.getTypeSpaces().asArray()).build();\n        }\n      }","sourceCodeStart":563,"sourceCodeEnd":599,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirStatAndListingOp.java#L563-L599","documentation":"Error \"File/Directory does not exist: {}\" thrown in apache/hadoop.","triggerScenarios":"Calling getContentSummary on a file or directory path that does not exist.","commonSituations":"See trigger scenarios.","solutions":["Check the path spelling and that the file/directory exists before the operation.","Use 'hdfs dfs -ls' on the parent to confirm the entry name."],"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-23T01:17:44.959Z"}