{"record":{"id":"6222b195524b1d4d","repo":"apache/hadoop","slug":"file-does-not-exist","errorCode":null,"errorMessage":"File does not exist: {}","messagePattern":"File 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":535,"sourceCode":"        .group(group)\n        .symlink(symlink)\n        .path(path)\n        .fileId(fileId)\n        .children(childrenNum)\n        .feInfo(feInfo)\n        .storagePolicy(storagePolicy)\n        .ecPolicy(ecPolicy)\n        .locations(locations)\n        .build();\n  }\n\n  private static ContentSummary getContentSummaryInt(FSDirectory fsd,\n      FSPermissionChecker pc, INodesInPath iip) throws IOException {\n    fsd.readLock();\n    try {\n      INode targetNode = iip.getLastINode();\n      if (targetNode == null) {\n        throw new FileNotFoundException(\"File does not exist: \" + iip.getPath());\n      }\n      else {\n        // Make it relinquish locks everytime contentCountLimit entries are\n        // processed. 0 means disabled. I.e. blocking for the entire duration.\n        ContentSummaryComputationContext cscc =\n            new ContentSummaryComputationContext(fsd, fsd.getFSNamesystem(),\n                fsd.getContentCountLimit(), fsd.getContentSleepMicroSec(), pc);\n        ContentSummary cs = targetNode.computeAndConvertContentSummary(\n            iip.getPathSnapshotId(), cscc);\n        fsd.addYieldCount(cscc.getYieldCount());\n        return cs;\n      }\n    } finally {\n      fsd.readUnlock();\n    }\n  }\n\n  static QuotaUsage getQuotaUsage(","sourceCodeStart":517,"sourceCodeEnd":553,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirStatAndListingOp.java#L517-L553","documentation":"Error \"File does not exist: {}\" thrown in apache/hadoop.","triggerScenarios":"Calling getFileInfo/getBlockLocations-style lookup on a path that does not exist in the namespace.","commonSituations":"See trigger scenarios.","solutions":["Verify the file path exists with 'hdfs dfs -ls'.","Correct the path or create the file before querying it."],"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"}